diff options
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index e6e8fb768a6..3bcdd55a197 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -425,12 +425,13 @@ string Slice::Contained::flattenedScope() const { string s = scope(); - string flattenedScope; - for(string::const_iterator r = s.begin(); r != s.end(); ++r) + string::size_type pos = 0; + while((pos = s.find("::", pos)) != string::npos) { - flattenedScope += ((*r) == ':') ? '_' : *r; + s.replace(pos, 2, "_"); + } - return flattenedScope; + return s; } string @@ -3805,13 +3806,13 @@ Slice::ClassDef::ClassDef(const ContainerPtr& container, const string& name, int bool Slice::Proxy::isLocal() const { - return __class->isLocal(); + return _classDecl->isLocal(); } string Slice::Proxy::typeId() const { - return __class->scoped(); + return _classDecl->scoped(); } bool @@ -3835,13 +3836,13 @@ Slice::Proxy::isVariableLength() const ClassDeclPtr Slice::Proxy::_class() const { - return __class; + return _classDecl; } Slice::Proxy::Proxy(const ClassDeclPtr& cl) : SyntaxTreeBase(cl->unit()), Type(cl->unit()), - __class(cl) + _classDecl(cl) { } |