diff options
author | Jose <jose@zeroc.com> | 2011-12-20 12:28:20 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2011-12-20 12:28:20 +0100 |
commit | 4990a34b535fab67aad1642a5fb5d5ec0a10212b (patch) | |
tree | c125a0b826b1323f8f908185d1a51a415504e130 /cpp/src/slice2freeze/Main.cpp | |
parent | Glacier2 sessionHelper minor fix (diff) | |
download | ice-4990a34b535fab67aad1642a5fb5d5ec0a10212b.tar.bz2 ice-4990a34b535fab67aad1642a5fb5d5ec0a10212b.tar.xz ice-4990a34b535fab67aad1642a5fb5d5ec0a10212b.zip |
ICE-3793 replace static with anon namespaces
Diffstat (limited to 'cpp/src/slice2freeze/Main.cpp')
-rw-r--r-- | cpp/src/slice2freeze/Main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp index 7e2afb2414c..d40d1c61cce 100644 --- a/cpp/src/slice2freeze/Main.cpp +++ b/cpp/src/slice2freeze/Main.cpp @@ -402,8 +402,11 @@ writeCodecC(const TypePtr& type, const StringList& metaData, const string& name, { typeId = "wstring"; } - C << sp << nl << "static const ::std::string " << staticName << " = \"" << typeId << "\";"; - + C << sp << nl << "namespace"; + C << sb; + C << sp << nl << "const ::std::string " << staticName << " = \"" << typeId << "\";"; + C << eb; + C << sp << nl << "const ::std::string&" << nl << name << "::typeId()"; C << sb; C << nl << "return " << staticName << ";"; |