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.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 71fd669cfec..5e66e89e292 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -520,15 +520,6 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
}
}
- H << sp << nl << "struct ICE_API __" << p->name() << "_init";
- H << sb;
- H << nl << "__" << p->name() << "_init();";
- H << eb << ';';
-
- C << sp << nl << scoped << "::__" << p->name() << "_init::__" << p->name() << "_init()";
- C << sb;
- C << eb;
-
string factoryName = "__F" + flattenedScope + name;
C << sp << nl << "class " << factoryName << " : public ::IceInternal::UserExceptionFactory";
@@ -582,8 +573,7 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
if(!p->isLocal())
{
- H << sp << nl << "static " << name << "::__" << p->name() << "_init __"
- << p->name() << "_initializer; // Force initializers in .cpp file to run";
+ H << sp << nl << "static " << fixKwd(p->scoped()) << " __" << p->name() << "_init;";
}
}
@@ -2274,15 +2264,6 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << nl << "extern \"C\" { void " << initfuncname << "() {} }";
C << nl << "#endif";
- H << sp << nl << "struct ICE_API __" << p->name() << "_init";
- H << sb;
- H << nl << "__" << p->name() << "_init();";
- H << eb << ';';
-
- C << sp << nl << scoped << "::__" << p->name() << "_init::__" << name << "_init()";
- C << sb;
- C << eb;
-
H.dec();
H << sp << nl << "private:";
H.inc();
@@ -2294,8 +2275,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
if(!p->isAbstract() && !p->isLocal())
{
- H << sp << nl << "static " << fixKwd(p->name()) << "::__" << p->name() << "_init __"
- << p->name() << "_initializer; // Force initializers in .cpp file to run";
+ H << sp << nl << "static " << scoped << " __" << p->name() << "_init;";
}
if(p->isLocal())