diff options
author | Bernard Normier <bernard@zeroc.com> | 2014-06-12 11:42:18 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2014-06-12 11:42:18 -0400 |
commit | 715c69e14fd00bede2dccc8930cfe1898ca36390 (patch) | |
tree | 7ab497780b40c1122a35b56bace6b3e06fa3584a /cpp/src | |
parent | Fixed VS2010 compilation error in GC code (diff) | |
download | ice-715c69e14fd00bede2dccc8930cfe1898ca36390.tar.bz2 ice-715c69e14fd00bede2dccc8930cfe1898ca36390.tar.xz ice-715c69e14fd00bede2dccc8930cfe1898ca36390.zip |
Fix for ICE-5542: add message to ICE_DEPRECATED_API in C++
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Initialize.cpp | 8 | ||||
-rw-r--r-- | cpp/src/Ice/StreamI.cpp | 8 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 7 |
3 files changed, 6 insertions, 17 deletions
diff --git a/cpp/src/Ice/Initialize.cpp b/cpp/src/Ice/Initialize.cpp index 74e9eb62577..5702d76c51d 100644 --- a/cpp/src/Ice/Initialize.cpp +++ b/cpp/src/Ice/Initialize.cpp @@ -7,14 +7,6 @@ // // ********************************************************************** -// -// We disable deprecation warning here, to allow clean compilation of -// of deprecated methods from StreamI.h. -// -#ifdef _MSC_VER -# pragma warning( disable : 4996 ) -#endif - #include <IceUtil/DisableWarnings.h> #include <IceUtil/ArgVector.h> #include <Ice/CommunicatorI.h> diff --git a/cpp/src/Ice/StreamI.cpp b/cpp/src/Ice/StreamI.cpp index e5a9920dd23..7537425a21c 100644 --- a/cpp/src/Ice/StreamI.cpp +++ b/cpp/src/Ice/StreamI.cpp @@ -7,14 +7,6 @@ // // ********************************************************************** -// -// We disable deprecation warning here, to allow clean compilation of -// of deprecated methods. -// -#ifdef _MSC_VER -# pragma warning( disable : 4996 ) -#endif - #include <Ice/StreamI.h> #include <Ice/Instance.h> #include <Ice/DefaultsAndOverrides.h> diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index c26c89ac518..1f8c2846bd3 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -36,7 +36,12 @@ getDeprecateSymbol(const ContainedPtr& p1, const ContainedPtr& p2) if(p1->findMetaData("deprecate", deprecateMetadata) || (p2 != 0 && p2->findMetaData("deprecate", deprecateMetadata))) { - deprecateSymbol = "ICE_DEPRECATED_API "; + string msg = "is deprecated"; + if(deprecateMetadata.find("deprecate:") == 0 && deprecateMetadata.size() > 10) + { + msg = deprecateMetadata.substr(10); + } + deprecateSymbol = "ICE_DEPRECATED_API(\"" + msg + "\") "; } return deprecateSymbol; } |