diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Freeze/freeze.dsp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/BasicStream.cpp | 13 | ||||
-rw-r--r-- | cpp/src/Ice/Object.cpp | 10 | ||||
-rw-r--r-- | cpp/src/Ice/ice.dsp | 2 | ||||
-rw-r--r-- | cpp/src/IcePack/icepack.dsp | 2 | ||||
-rw-r--r-- | cpp/src/IcePack/icepackC.dsp | 2 | ||||
-rw-r--r-- | cpp/src/IcePack/icepackS.dsp | 2 | ||||
-rw-r--r-- | cpp/src/IceStorm/icestorm.dsp | 2 | ||||
-rw-r--r-- | cpp/src/IceStorm/icestormC.dsp | 2 | ||||
-rw-r--r-- | cpp/src/IceStorm/icestormS.dsp | 2 | ||||
-rw-r--r-- | cpp/src/IceUtil/iceutil.dsp | 2 | ||||
-rw-r--r-- | cpp/src/Slice/slice.dsp | 2 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 27 | ||||
-rw-r--r-- | cpp/src/slice2cpp/slice2cpp.dsp | 2 | ||||
-rw-r--r-- | cpp/src/slice2docbook/slice2docbook.dsp | 2 | ||||
-rw-r--r-- | cpp/src/slice2freeze/slice2freeze.dsp | 2 |
16 files changed, 42 insertions, 34 deletions
diff --git a/cpp/src/Freeze/freeze.dsp b/cpp/src/Freeze/freeze.dsp index e4b48d6eef7..e295c7f0536 100644 --- a/cpp/src/Freeze/freeze.dsp +++ b/cpp/src/Freeze/freeze.dsp @@ -44,7 +44,7 @@ RSC=rc.exe # PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRARY_EXPORTS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /D "NDEBUG" /D "_USRDLL" /D "FREEZE_API_EXPORTS" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
-# SUBTRACT CPP /Fr
+# SUBTRACT CPP /Z<none> /Fr
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index cc37bf1da1f..6c078ff4c7f 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -24,10 +24,9 @@ using namespace Ice; using namespace IceInternal; IceInternal::BasicStream::BasicStream(const InstancePtr& instance) : - _instance(instance) + _instance(instance), + _encapsStack(1) { - _encapsStack.reserve(4); - _encapsStack.resize(1); _encapsStack.back().encoding = 0; _encapsStack.back().start = 0; } @@ -652,19 +651,23 @@ IceInternal::BasicStream::read(vector<Double>& v) void IceInternal::BasicStream::write(const string& v) { +#ifdef ICE_ACTIVE_STRING_INDIRECTION map<string, Int>::const_iterator p = _encapsStack.back().stringsWritten.find(v); if (p != _encapsStack.back().stringsWritten.end()) { write(p->second); } else +#endif { Int len = v.size(); write(len); if (len > 0) { +#ifdef ICE_ACTIVE_STRING_INDIRECTION Int num = _encapsStack.back().stringsWritten.size(); _encapsStack.back().stringsWritten[v] = -(num + 1); +#endif int pos = b.size(); resize(pos + len); copy(v.begin(), v.end(), b.begin() + pos); @@ -739,19 +742,23 @@ IceInternal::BasicStream::read(vector<string>& v) void IceInternal::BasicStream::write(const wstring& v) { +#ifdef ICE_ACTIVE_STRING_INDIRECTION map<wstring, Int>::const_iterator p = _encapsStack.back().wstringsWritten.find(v); if (p != _encapsStack.back().wstringsWritten.end()) { write(p->second); } else +#endif { Int len = v.size(); write(len); if (len > 0) { +#ifdef ICE_ACTIVE_STRING_INDIRECTION Int num = _encapsStack.back().wstringsWritten.size(); _encapsStack.back().wstringsWritten[v] = -(num + 1); +#endif wstring::const_iterator p; for (p = v.begin(); p != v.end(); ++p) { diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp index 410816f6c96..4bdb69d73ab 100644 --- a/cpp/src/Ice/Object.cpp +++ b/cpp/src/Ice/Object.cpp @@ -52,13 +52,13 @@ Ice::Object::ice_hash() const return reinterpret_cast<Int>(this); } -string Ice::Object::__classIds[] = +const string Ice::Object::__classIds[] = { "::Ice::Object" }; -string* -Ice::Object::__getClassIds() +const string* +Ice::Object::__getClassIds() const { return __classIds; } @@ -103,7 +103,9 @@ string Ice::Object::__all[] = DispatchStatus Ice::Object::__dispatch(Incoming& in, const Current& current) { - pair<string*, string*> r = equal_range(__all, __all + sizeof(__all) / sizeof(string), current.operation); + pair<const string*, const string*> r = + equal_range(__all, __all + sizeof(__all) / sizeof(string), current.operation); + if (r.first == r.second) { return DispatchOperationNotExist; diff --git a/cpp/src/Ice/ice.dsp b/cpp/src/Ice/ice.dsp index e1e15b68368..f2c72cf817e 100644 --- a/cpp/src/Ice/ice.dsp +++ b/cpp/src/Ice/ice.dsp @@ -44,7 +44,7 @@ RSC=rc.exe # PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRARY_EXPORTS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /D "WIN32" /D "_UNICODE" /D "NDEBUG" /D "_CONSOLE" /D "_USRDLL" /D "ICE_API_EXPORTS" /YX /FD /c
-# SUBTRACT CPP /Fr
+# SUBTRACT CPP /Z<none> /Fr
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
diff --git a/cpp/src/IcePack/icepack.dsp b/cpp/src/IcePack/icepack.dsp index dc2751b7359..d592175fae7 100644 --- a/cpp/src/IcePack/icepack.dsp +++ b/cpp/src/IcePack/icepack.dsp @@ -44,7 +44,7 @@ RSC=rc.exe # PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRARY_EXPORTS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /D "NDEBUG" /D "_USRDLL" /D "ICE_PACK_API_EXPORTS" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
-# SUBTRACT CPP /Fr
+# SUBTRACT CPP /Z<none> /Fr
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
diff --git a/cpp/src/IcePack/icepackC.dsp b/cpp/src/IcePack/icepackC.dsp index 89621cbbf7f..2abd6b5ca4e 100644 --- a/cpp/src/IcePack/icepackC.dsp +++ b/cpp/src/IcePack/icepackC.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /I "dummyinclude" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
-# SUBTRACT CPP /Fr
+# SUBTRACT CPP /Z<none> /Fr
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
diff --git a/cpp/src/IcePack/icepackS.dsp b/cpp/src/IcePack/icepackS.dsp index fab439666f0..40bd04ec167 100644 --- a/cpp/src/IcePack/icepackS.dsp +++ b/cpp/src/IcePack/icepackS.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
-# SUBTRACT CPP /Fr
+# SUBTRACT CPP /Z<none> /Fr
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
diff --git a/cpp/src/IceStorm/icestorm.dsp b/cpp/src/IceStorm/icestorm.dsp index 7e1633bcd0d..f10244e686d 100644 --- a/cpp/src/IceStorm/icestorm.dsp +++ b/cpp/src/IceStorm/icestorm.dsp @@ -44,7 +44,7 @@ RSC=rc.exe # PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRARY_EXPORTS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /D "NDEBUG" /D "_USRDLL" /D "ICE_STORM_API_EXPORTS" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
-# SUBTRACT CPP /Fr
+# SUBTRACT CPP /Z<none> /Fr
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
diff --git a/cpp/src/IceStorm/icestormC.dsp b/cpp/src/IceStorm/icestormC.dsp index d30ca8a52a5..d7d5239add6 100644 --- a/cpp/src/IceStorm/icestormC.dsp +++ b/cpp/src/IceStorm/icestormC.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /I "dummyinclude" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
-# SUBTRACT CPP /Fr
+# SUBTRACT CPP /Z<none> /Fr
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
diff --git a/cpp/src/IceStorm/icestormS.dsp b/cpp/src/IceStorm/icestormS.dsp index f07a6c748e6..390fcc6d3c3 100644 --- a/cpp/src/IceStorm/icestormS.dsp +++ b/cpp/src/IceStorm/icestormS.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
-# SUBTRACT CPP /Fr
+# SUBTRACT CPP /Z<none> /Fr
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
diff --git a/cpp/src/IceUtil/iceutil.dsp b/cpp/src/IceUtil/iceutil.dsp index e4c3e177a0c..5adf394659b 100644 --- a/cpp/src/IceUtil/iceutil.dsp +++ b/cpp/src/IceUtil/iceutil.dsp @@ -44,7 +44,7 @@ RSC=rc.exe # PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRARY_EXPORTS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /D "NDEBUG" /D "_USRDLL" /D "ICE_UTIL_API_EXPORTS" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
-# SUBTRACT CPP /Fr
+# SUBTRACT CPP /Z<none> /Fr
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
diff --git a/cpp/src/Slice/slice.dsp b/cpp/src/Slice/slice.dsp index b7a819d2f39..73d451f6ab2 100644 --- a/cpp/src/Slice/slice.dsp +++ b/cpp/src/Slice/slice.dsp @@ -44,7 +44,7 @@ RSC=rc.exe # PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PARSER_EXPORTS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I ".." /I "../../include" /I "dummyinclude" /D "NDEBUG" /D "_USRDLL" /D "SLICE_API_EXPORTS" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
-# SUBTRACT CPP /Fr
+# SUBTRACT CPP /Z<none> /Fr
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 3c2671bc8f8..69a7343aaa4 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -281,9 +281,10 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) StringList::const_iterator q; H << sp; - H << nl << _dllExport << "static ::std::string __exceptionIds[" << exceptionIds.size() << "];"; - H << nl << _dllExport << "virtual ::std::string* __getExceptionIds() const;"; - C << sp << nl << "::std::string " << scoped.substr(2) << "::__exceptionIds[" << exceptionIds.size() << "] ="; + H << nl << _dllExport << "static const ::std::string __exceptionIds[" << exceptionIds.size() << "];"; + H << nl << _dllExport << "virtual const ::std::string* __getExceptionIds() const;"; + C << sp << nl << "const ::std::string " << scoped.substr(2) << "::__exceptionIds[" << exceptionIds.size() + << "] ="; C << sb; q = exceptionIds.begin(); while (q != exceptionIds.end()) @@ -295,7 +296,7 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p) } } C << eb << ';'; - C << sp << nl << "::std::string*" << nl << scoped.substr(2) << "::__getExceptionIds() const"; + C << sp << nl << "const ::std::string*" << nl << scoped.substr(2) << "::__getExceptionIds() const"; C << sb; C << nl << "return __exceptionIds;"; C << eb; @@ -1580,12 +1581,12 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) StringList::const_iterator q; H << sp; - H << nl << exp2 << "static ::std::string __ids[" << ids.size() << "];"; - H << nl << exp2 << "static ::std::string __classIds[" << classIds.size() << "];"; + H << nl << exp2 << "static const ::std::string __ids[" << ids.size() << "];"; + H << nl << exp2 << "static const ::std::string __classIds[" << classIds.size() << "];"; H << nl << exp2 << "virtual bool ice_isA(const ::std::string&, const ::Ice::Current& = ::Ice::Current());"; - H << nl << exp2 << "virtual ::std::string* __getClassIds();"; + H << nl << exp2 << "virtual const ::std::string* __getClassIds() const;"; C << sp; - C << nl << "::std::string " << scoped.substr(2) << "::__ids[" << ids.size() << "] ="; + C << nl << "const ::std::string " << scoped.substr(2) << "::__ids[" << ids.size() << "] ="; C << sb; q = ids.begin(); while (q != ids.end()) @@ -1598,7 +1599,7 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) } C << eb << ';'; C << sp; - C << nl << "::std::string " << scoped.substr(2) << "::__classIds[" << classIds.size() << "] ="; + C << nl << "const ::std::string " << scoped.substr(2) << "::__classIds[" << classIds.size() << "] ="; C << sb; q = classIds.begin(); while (q != classIds.end()) @@ -1613,12 +1614,10 @@ Slice::Gen::ObjectVisitor::visitClassDefStart(const ClassDefPtr& p) C << sp; C << nl << "bool" << nl << scoped.substr(2) << "::ice_isA(const ::std::string& s, const ::Ice::Current&)"; C << sb; - C << nl << "::std::string* b = __ids;"; - C << nl << "::std::string* e = __ids + " << ids.size() << ';'; - C << nl << "return ::std::binary_search(b, e, s);"; + C << nl << "return ::std::binary_search(__ids, __ids + " << ids.size() << ", s);"; C << eb; C << sp; - C << nl << "::std::string*" << nl << scoped.substr(2) << "::__getClassIds()"; + C << nl << "const ::std::string*" << nl << scoped.substr(2) << "::__getClassIds() const"; C << sb; C << nl << "return __classIds;"; C << eb; @@ -1684,7 +1683,7 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) C << nl << "::IceInternal::DispatchStatus" << nl << scoped.substr(2) << "::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)"; C << sb; - C << nl << "::std::pair< ::std::string*, ::std::string*> r = " + C << nl << "::std::pair<const ::std::string*, const ::std::string*> r = " << "::std::equal_range(__all, __all + " << allOpNames.size() << ", current.operation);"; C << nl << "if (r.first == r.second)"; C << sb; diff --git a/cpp/src/slice2cpp/slice2cpp.dsp b/cpp/src/slice2cpp/slice2cpp.dsp index 792bb5d81c8..5d763a2e569 100644 --- a/cpp/src/slice2cpp/slice2cpp.dsp +++ b/cpp/src/slice2cpp/slice2cpp.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
-# SUBTRACT CPP /Fr
+# SUBTRACT CPP /Z<none> /Fr
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
diff --git a/cpp/src/slice2docbook/slice2docbook.dsp b/cpp/src/slice2docbook/slice2docbook.dsp index b6084aff97d..4cb7a54d8bf 100644 --- a/cpp/src/slice2docbook/slice2docbook.dsp +++ b/cpp/src/slice2docbook/slice2docbook.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../include" /I "../parser" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
-# SUBTRACT CPP /Fr
+# SUBTRACT CPP /Z<none> /Fr
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
diff --git a/cpp/src/slice2freeze/slice2freeze.dsp b/cpp/src/slice2freeze/slice2freeze.dsp index 4ebdd501f4e..78cc58fd253 100644 --- a/cpp/src/slice2freeze/slice2freeze.dsp +++ b/cpp/src/slice2freeze/slice2freeze.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../include" /I "../parser" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
-# SUBTRACT CPP /Fr
+# SUBTRACT CPP /Z<none> /Fr
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
|