summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp3
-rw-r--r--cpp/src/slice2java/Gen.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 22a033421c6..f990ccdf38a 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -4460,7 +4460,8 @@ Slice::Gen::ObjectVisitor::emitOneShotConstructor(const ClassDefPtr& p)
if(!allDataMembers.empty())
{
- C << sp << nl << p->scoped().substr(2) << "::" << fixKwd(p->name()) << spar << allParamDecls << epar << " :";
+ C << sp << nl << fixKwd(p->scoped()).substr(2) << "::" << fixKwd(p->name())
+ << spar << allParamDecls << epar << " :";
C.inc();
DataMemberList dataMembers = p->dataMembers();
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index ab9cc42aed4..0a9a6616a8c 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -1837,7 +1837,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
// Constructors.
//
out << sp;
- out << nl << "public " << name << "()";
+ out << nl << "public " << fixKwd(name) << "()";
out << sb;
if(baseClass)
{
@@ -1845,7 +1845,7 @@ Slice::Gen::TypesVisitor::visitClassDefStart(const ClassDefPtr& p)
}
out << eb;
- out << sp << nl << "public " << name << spar;
+ out << sp << nl << "public " << fixKwd(name) << spar;
vector<string> paramDecl;
for(d = allDataMembers.begin(); d != allDataMembers.end(); ++d)
{