summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index afb8f2976c7..0b3347f936e 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -6747,12 +6747,17 @@ Slice::Gen::Cpp11ProxyVisitor::visitClassDefStart(const ClassDefPtr& p)
writeDocSummary(H, p);
H << nl << "class " << _dllClassExport << p->name() << "Prx : public virtual "
<< getUnqualified("::Ice::Proxy", scope) << "<" << fixKwd(p->name() + "Prx") << ", ";
- if(bases.empty() || (base && base->allOperations().empty()))
+ if(bases.empty() || (bases.size() == 1 && base && base->allOperations().empty()))
{
H << getUnqualified("::Ice::ObjectPrx", scope);
}
else
{
+ if(base && base->allOperations().empty())
+ {
+ bases.pop_front();
+ }
+
ClassList::const_iterator q = bases.begin();
while(q != bases.end())
{
@@ -7877,12 +7882,17 @@ Slice::Gen::Cpp11InterfaceVisitor::visitClassDefStart(const ClassDefPtr& p)
writeDocSummary(H, p);
H << nl << "class " << _dllExport << name << " : ";
H.useCurrentPosAsIndent();
- if(bases.empty() || (base && base->allOperations().empty()))
+ if(bases.empty() || (base && bases.size() == 1 && base->allOperations().empty()))
{
H << "public virtual " << getUnqualified("::Ice::Object", scope);
}
else
{
+ if(base && base->allOperations().empty())
+ {
+ bases.pop_front();
+ }
+
ClassList::const_iterator q = bases.begin();
while(q != bases.end())
{