summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Freeze/freeze.dsp12
-rw-r--r--cpp/src/Ice/Object.cpp8
-rw-r--r--cpp/src/slice2cpp/Gen.cpp39
3 files changed, 37 insertions, 22 deletions
diff --git a/cpp/src/Freeze/freeze.dsp b/cpp/src/Freeze/freeze.dsp
index 20658116876..f451d224ce5 100644
--- a/cpp/src/Freeze/freeze.dsp
+++ b/cpp/src/Freeze/freeze.dsp
@@ -164,6 +164,7 @@ SOURCE=..\..\slice\Freeze\DB.ice
!IF "$(CFG)" == "Freeze - Win32 Release"
+USERDEP__DB_IC="..\..\bin\slice2cpp.exe"
# Begin Custom Build
InputPath=..\..\slice\Freeze\DB.ice
@@ -182,6 +183,7 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "Freeze - Win32 Debug"
+USERDEP__DB_IC="..\..\bin\slice2cpp.exe"
# Begin Custom Build
InputPath=..\..\slice\Freeze\DB.ice
@@ -207,6 +209,7 @@ SOURCE=..\..\slice\Freeze\DBF.ice
!IF "$(CFG)" == "Freeze - Win32 Release"
+USERDEP__DBF_I="..\..\bin\slice2cpp.exe"
# Begin Custom Build
InputPath=..\..\slice\Freeze\DBF.ice
@@ -220,6 +223,7 @@ InputPath=..\..\slice\Freeze\DBF.ice
!ELSEIF "$(CFG)" == "Freeze - Win32 Debug"
+USERDEP__DBF_I="..\..\bin\slice2cpp.exe"
# Begin Custom Build
InputPath=..\..\slice\Freeze\DBF.ice
@@ -240,6 +244,7 @@ SOURCE=..\..\slice\Freeze\Evictor.ice
!IF "$(CFG)" == "Freeze - Win32 Release"
+USERDEP__EVICT="..\..\bin\slice2cpp.exe"
# Begin Custom Build
InputPath=..\..\slice\Freeze\Evictor.ice
@@ -249,7 +254,7 @@ BuildCmds= \
move Evictor.h ..\..\include\Freeze \
-"..\..\include\Freeze\Evictor" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+"..\..\include\Freeze\Evictor.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"Evictor.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
@@ -258,6 +263,7 @@ BuildCmds= \
!ELSEIF "$(CFG)" == "Freeze - Win32 Debug"
+USERDEP__EVICT="..\..\bin\slice2cpp.exe"
# Begin Custom Build
InputPath=..\..\slice\Freeze\Evictor.ice
@@ -267,7 +273,7 @@ BuildCmds= \
move Evictor.h ..\..\include\Freeze \
-"..\..\include\Freeze\Evictor" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+"..\..\include\Freeze\Evictor.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"Evictor.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
@@ -283,6 +289,7 @@ SOURCE=..\..\slice\Freeze\EvictorF.ice
!IF "$(CFG)" == "Freeze - Win32 Release"
+USERDEP__EVICTO="..\..\bin\slice2cpp.exe"
# Begin Custom Build
InputPath=..\..\slice\Freeze\EvictorF.ice
@@ -296,6 +303,7 @@ InputPath=..\..\slice\Freeze\EvictorF.ice
!ELSEIF "$(CFG)" == "Freeze - Win32 Debug"
+USERDEP__EVICTO="..\..\bin\slice2cpp.exe"
# Begin Custom Build
InputPath=..\..\slice\Freeze\EvictorF.ice
diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp
index 4c005c6df60..8fe1b99a590 100644
--- a/cpp/src/Ice/Object.cpp
+++ b/cpp/src/Ice/Object.cpp
@@ -104,10 +104,6 @@ string Ice::Object::__names[] =
"_ping"
};
-string Ice::Object::__mutating[] =
-{
-};
-
DispatchStatus
Ice::Object::__dispatch(Incoming& in, const string& s)
{
@@ -138,7 +134,5 @@ Ice::Object::__dispatch(Incoming& in, const string& s)
bool
Ice::Object::__isMutating(const std::string& s)
{
- string* b = __mutating;
- string* e = __mutating + sizeof(__mutating) / sizeof(string);
- return ::std::binary_search(b, e, s);
+ return false;
}
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 95ff7ec2e49..98e5f039e78 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -1542,7 +1542,10 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
H << sp;
H << nl << exp2 << "static ::std::string __all[" << allOpNames.size() << "];";
- H << nl << exp2 << "static ::std::string __mutating[" << allMutatingOpNames.size() << "];";
+ if (!allMutatingOpNames.empty())
+ {
+ H << nl << exp2 << "static ::std::string __mutating[" << allMutatingOpNames.size() << "];";
+ }
H << nl << exp2 << "virtual ::IceInternal::DispatchStatus "
<< "__dispatch(::IceInternal::Incoming&, const ::std::string&);";
H << nl << exp2 << "virtual bool __isMutating(const ::std::string&);";
@@ -1559,19 +1562,22 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
}
}
C << eb << ';';
- C << sp;
- C << nl << "::std::string " << scoped.substr(2) << "::__mutating[] =";
- C << sb;
- q = allMutatingOpNames.begin();
- while (q != allMutatingOpNames.end())
+ if (!allMutatingOpNames.empty())
{
- C << nl << '"' << *q << '"';
- if (++q != allMutatingOpNames.end())
+ C << sp;
+ C << nl << "::std::string " << scoped.substr(2) << "::__mutating[] =";
+ C << sb;
+ q = allMutatingOpNames.begin();
+ while (q != allMutatingOpNames.end())
{
- C << ',';
+ C << nl << '"' << *q << '"';
+ if (++q != allMutatingOpNames.end())
+ {
+ C << ',';
+ }
}
+ C << eb << ';';
}
- C << eb << ';';
C << sp;
C << nl << "::IceInternal::DispatchStatus" << nl << scoped.substr(2)
<< "::__dispatch(::IceInternal::Incoming& in, const ::std::string& s)";
@@ -1603,9 +1609,16 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p)
C << nl << "bool" << nl << scoped.substr(2)
<< "::__isMutating(const ::std::string& s)";
C << sb;
- C << nl << "::std::string* b = __mutating;";
- C << nl << "::std::string* e = __mutating + " << allMutatingOpNames.size() << ';';
- C << nl << "return ::std::binary_search(b, e, s);";
+ if (!allMutatingOpNames.empty())
+ {
+ C << nl << "::std::string* b = __mutating;";
+ C << nl << "::std::string* e = __mutating + " << allMutatingOpNames.size() << ';';
+ C << nl << "return ::std::binary_search(b, e, s);";
+ }
+ else
+ {
+ C << nl << "return false;";
+ }
C << eb;
}
H << sp;