summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Parser.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-11-02 17:56:08 -0400
committerBernard Normier <bernard@zeroc.com>2016-11-02 17:56:08 -0400
commit91fa99c34d1211d426b24bf68001fc27a87b3f00 (patch)
tree15af995f00414098b678b4cff09a9f0c29830fa8 /cpp/src/Slice/Parser.cpp
parentAdd C# code sign support (diff)
downloadice-91fa99c34d1211d426b24bf68001fc27a87b3f00.tar.bz2
ice-91fa99c34d1211d426b24bf68001fc27a87b3f00.tar.xz
ice-91fa99c34d1211d426b24bf68001fc27a87b3f00.zip
Replaced double and triple underscores in C++ by ice-prefixed names
Diffstat (limited to 'cpp/src/Slice/Parser.cpp')
-rw-r--r--cpp/src/Slice/Parser.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp
index e6e8fb768a6..77038503d92 100644
--- a/cpp/src/Slice/Parser.cpp
+++ b/cpp/src/Slice/Parser.cpp
@@ -425,12 +425,14 @@ string
Slice::Contained::flattenedScope() const
{
string s = scope();
- string flattenedScope;
- for(string::const_iterator r = s.begin(); r != s.end(); ++r)
+ const string doubleColon = "::";
+
+ size_t pos = 0;
+ while((pos = s.find(doubleColon, pos)) != string::npos)
{
- flattenedScope += ((*r) == ':') ? '_' : *r;
+ s.replace(pos++, doubleColon.length(), "_");
}
- return flattenedScope;
+ return s;
}
string
@@ -3805,13 +3807,13 @@ Slice::ClassDef::ClassDef(const ContainerPtr& container, const string& name, int
bool
Slice::Proxy::isLocal() const
{
- return __class->isLocal();
+ return _classDM->isLocal();
}
string
Slice::Proxy::typeId() const
{
- return __class->scoped();
+ return _classDM->scoped();
}
bool
@@ -3835,13 +3837,13 @@ Slice::Proxy::isVariableLength() const
ClassDeclPtr
Slice::Proxy::_class() const
{
- return __class;
+ return _classDM;
}
Slice::Proxy::Proxy(const ClassDeclPtr& cl) :
SyntaxTreeBase(cl->unit()),
Type(cl->unit()),
- __class(cl)
+ _classDM(cl)
{
}