diff options
author | Jose <jose@zeroc.com> | 2015-12-28 14:15:32 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-12-28 15:09:27 +0100 |
commit | 0796f3d662270be771663c0579fde946a7b863d1 (patch) | |
tree | 7315f892b62d042941fa0607386e2e6b991967ae /cpp/src/slice2cpp/Gen.cpp | |
parent | Fix binary compatibility issue with previous fix (diff) | |
download | ice-3.6.1-msvc2015.tar.bz2 ice-3.6.1-msvc2015.tar.xz ice-3.6.1-msvc2015.zip |
Object factory registration fix for VS 2015v3.6.1-msvc2015
Diffstat (limited to 'cpp/src/slice2cpp/Gen.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index dff1f3c31aa..cffcff2bafe 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -3326,7 +3326,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. @@ -3355,6 +3355,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(); } |