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.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index b81d26c9c35..1f7afafb118 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -225,7 +225,8 @@ Slice::Gen::Gen(const string& base, const string& headerExtension, const string&
Slice::Gen::~Gen()
{
- H << "\n\n#endif\n";
+ H << "\n\n#include <IceUtil/PopDisableWarnings.h>";
+ H << "\n#endif\n";
C << '\n';
if(_impl)
@@ -361,8 +362,10 @@ Slice::Gen::generate(const UnitPtr& p)
C << _include << '/';
}
C << _base << "." << _headerExtension << ">";
+ C << "\n#include <IceUtil/PushDisableWarnings.h>";
+ H << "\n#include <IceUtil/PushDisableWarnings.h>";
H << "\n#include <Ice/ProxyF.h>";
H << "\n#include <Ice/ObjectF.h>";
H << "\n#include <Ice/Exception.h>";
@@ -435,6 +438,7 @@ Slice::Gen::generate(const UnitPtr& p)
}
C << "\n#include <IceUtil/Iterator.h>";
+ C << "\n#include <IceUtil/PopDisableWarnings.h>";
StringList includes = p->includeFiles();
@@ -450,11 +454,6 @@ Slice::Gen::generate(const UnitPtr& p)
H << "\n#include <IceUtil/UndefSysMacros.h>";
- if(_ice)
- {
- C << "\n#include <IceUtil/DisableWarnings.h>";
- }
-
//
// Emit #include statements for any cpp:include metadata directives
// in the top-level Slice file.