summaryrefslogtreecommitdiff
path: root/cpp/src/slice2freeze/Main.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2011-12-20 12:28:20 +0100
committerJose <jose@zeroc.com>2011-12-20 12:28:20 +0100
commit4990a34b535fab67aad1642a5fb5d5ec0a10212b (patch)
treec125a0b826b1323f8f908185d1a51a415504e130 /cpp/src/slice2freeze/Main.cpp
parentGlacier2 sessionHelper minor fix (diff)
downloadice-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.cpp7
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 << ";";