diff options
author | Jose <jose@zeroc.com> | 2011-12-30 18:45:24 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2011-12-30 18:45:24 +0100 |
commit | fe0fe8f1d64ff480517cdb3e0d8932f8374385f1 (patch) | |
tree | 0f33be0566e544b8d77c518126548613f9342b91 /cpp/src/slice2cpp/Gen.cpp | |
parent | test for ICE-4708 Regression generated code for default-value (diff) | |
download | ice-fe0fe8f1d64ff480517cdb3e0d8932f8374385f1.tar.bz2 ice-fe0fe8f1d64ff480517cdb3e0d8932f8374385f1.tar.xz ice-fe0fe8f1d64ff480517cdb3e0d8932f8374385f1.zip |
ICE-4760 - slice2cpp unused generate global op names for local interfaces
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index ae8386b2570..1a1337e5922 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -3736,8 +3736,12 @@ Slice::Gen::ObjectDeclVisitor::visitClassDecl(const ClassDeclPtr& p) void Slice::Gen::ObjectDeclVisitor::visitOperation(const OperationPtr& p) { - string flatName = p->flattenedScope() + p->name() + "_name"; - C << sp << nl << "const ::std::string " << flatName << " = \"" << p->name() << "\";"; + ClassDefPtr cl = ClassDefPtr::dynamicCast(p->container()); + if(cl && !cl->isLocal()) + { + string flatName = p->flattenedScope() + p->name() + "_name"; + C << sp << nl << "const ::std::string " << flatName << " = \"" << p->name() << "\";"; + } } Slice::Gen::ObjectVisitor::ObjectVisitor(Output& h, Output& c, const string& dllExport, bool stream) : |