diff options
author | Bernard Normier <bernard@zeroc.com> | 2016-11-05 10:51:56 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2016-11-05 10:51:56 -0400 |
commit | a9207c4a7e8190cb64286afc1b373f16010d0feb (patch) | |
tree | b6815a6debc9b9589145cc12f192b6dd83b3f49e /cpp/src/Slice/Parser.cpp | |
parent | Revert "Reverted previous double-underscore changes in IceUtil classes" (diff) | |
download | ice-a9207c4a7e8190cb64286afc1b373f16010d0feb.tar.bz2 ice-a9207c4a7e8190cb64286afc1b373f16010d0feb.tar.xz ice-a9207c4a7e8190cb64286afc1b373f16010d0feb.zip |
Revert "Replaced double and triple underscores in C++ by ice-prefixed names"
This reverts commit 91fa99c34d1211d426b24bf68001fc27a87b3f00.
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 77038503d92..e6e8fb768a6 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -425,14 +425,12 @@ string Slice::Contained::flattenedScope() const { string s = scope(); - const string doubleColon = "::"; - - size_t pos = 0; - while((pos = s.find(doubleColon, pos)) != string::npos) + string flattenedScope; + for(string::const_iterator r = s.begin(); r != s.end(); ++r) { - s.replace(pos++, doubleColon.length(), "_"); + flattenedScope += ((*r) == ':') ? '_' : *r; } - return s; + return flattenedScope; } string @@ -3807,13 +3805,13 @@ Slice::ClassDef::ClassDef(const ContainerPtr& container, const string& name, int bool Slice::Proxy::isLocal() const { - return _classDM->isLocal(); + return __class->isLocal(); } string Slice::Proxy::typeId() const { - return _classDM->scoped(); + return __class->scoped(); } bool @@ -3837,13 +3835,13 @@ Slice::Proxy::isVariableLength() const ClassDeclPtr Slice::Proxy::_class() const { - return _classDM; + return __class; } Slice::Proxy::Proxy(const ClassDeclPtr& cl) : SyntaxTreeBase(cl->unit()), Type(cl->unit()), - _classDM(cl) + __class(cl) { } |