summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/Gen.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-12-28 16:02:31 +0100
committerJose <jose@zeroc.com>2015-12-28 16:02:31 +0100
commit99f4220ab2973aa8eebfb95aaf4781e67fb890d9 (patch)
tree541b67563e235c827c5eebb9be5733d540788ef9 /cpp/src/slice2cpp/Gen.cpp
parentFixed RPATH issue to find TestCommon with /usr installs (diff)
parentObject factory registration fix for VS 2015 (diff)
downloadice-99f4220ab2973aa8eebfb95aaf4781e67fb890d9.tar.bz2
ice-99f4220ab2973aa8eebfb95aaf4781e67fb890d9.tar.xz
ice-99f4220ab2973aa8eebfb95aaf4781e67fb890d9.zip
Merge remote-tracking branch 'origin/3.6'
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 37ac01ccc8e..15590b93b98 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -3417,7 +3417,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << eb << ';';
- if(!p->isAbstract() && !_doneStaticSymbol)
+ if(!p->isAbstract() && !p->isLocal() && !_doneStaticSymbol)
{
//
// We need an instance here to trigger initialization if the implementation is in a shared library.
@@ -3446,6 +3446,12 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << sp << nl << "static " << p->name() << "__staticInit _" << p->name() << "_init;";
H.zeroIndent();
+ H << nl << "#else";
+ H.restoreIndent();
+
+ H << nl << "static auto _" << p->name() << "_init = " << p->scoped() << "::ice_factory;";
+
+ H.zeroIndent();
H << nl << "#endif";
H.restoreIndent();
}