summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpp/include/Ice/Exception.h4
-rw-r--r--cpp/include/IceUtil/CtrlCHandler.h2
-rw-r--r--cpp/include/IceUtil/Exception.h4
-rw-r--r--cpp/include/IceUtil/ThreadException.h8
-rw-r--r--cpp/include/IceUtil/UUID.h2
-rw-r--r--cpp/include/IceXML/Parser.h2
-rw-r--r--cpp/src/FreezeScript/Exception.cpp2
-rw-r--r--cpp/src/FreezeScript/Exception.h2
-rw-r--r--cpp/src/FreezeScript/Parser.cpp2
-rw-r--r--cpp/src/FreezeScript/Parser.h2
-rw-r--r--cpp/src/IceUtil/CtrlCHandler.cpp2
-rw-r--r--cpp/src/IceUtil/Exception.cpp4
-rw-r--r--cpp/src/IceUtil/ThreadException.cpp8
-rw-r--r--cpp/src/IceUtil/UUID.cpp2
-rw-r--r--cpp/src/IceXML/Parser.cpp2
-rw-r--r--cpp/src/slice2cpp/Gen.cpp4
-rw-r--r--cpp/src/slice2cppe/Gen.cpp4
-rw-r--r--cpp/test/Ice/slicing/exceptions/AllTests.cpp50
-rw-r--r--cpp/test/Ice/slicing/objects/AllTests.cpp16
19 files changed, 61 insertions, 61 deletions
diff --git a/cpp/include/Ice/Exception.h b/cpp/include/Ice/Exception.h
index 1acf9269c1e..e6c1fa72ac6 100644
--- a/cpp/include/Ice/Exception.h
+++ b/cpp/include/Ice/Exception.h
@@ -31,7 +31,7 @@ class ICE_API LocalException : public IceUtil::Exception
public:
LocalException(const char*, int);
- virtual const char* ice_name() const = 0;
+ virtual const std::string ice_name() const = 0;
virtual Exception* ice_clone() const = 0;
virtual void ice_throw() const = 0;
};
@@ -40,7 +40,7 @@ class ICE_API UserException : public IceUtil::Exception
{
public:
- virtual const char* ice_name() const = 0;
+ virtual const std::string ice_name() const = 0;
virtual Exception* ice_clone() const = 0;
virtual void ice_throw() const = 0;
diff --git a/cpp/include/IceUtil/CtrlCHandler.h b/cpp/include/IceUtil/CtrlCHandler.h
index 527f3800e25..04ab2464612 100644
--- a/cpp/include/IceUtil/CtrlCHandler.h
+++ b/cpp/include/IceUtil/CtrlCHandler.h
@@ -61,7 +61,7 @@ class ICE_UTIL_API CtrlCHandlerException : public Exception
public:
CtrlCHandlerException(const char*, int);
- virtual const char* ice_name() const;
+ virtual const std::string ice_name() const;
virtual Exception* ice_clone() const;
virtual void ice_throw() const;
};
diff --git a/cpp/include/IceUtil/Exception.h b/cpp/include/IceUtil/Exception.h
index 961a6f144d8..de7ec1daab5 100644
--- a/cpp/include/IceUtil/Exception.h
+++ b/cpp/include/IceUtil/Exception.h
@@ -22,7 +22,7 @@ public:
Exception();
Exception(const char*, int);
virtual ~Exception();
- virtual const char* ice_name() const;
+ virtual const std::string ice_name() const;
virtual void ice_print(std::ostream&) const;
virtual Exception* ice_clone() const;
virtual void ice_throw() const;
@@ -43,7 +43,7 @@ class ICE_UTIL_API NullHandleException : public Exception
public:
NullHandleException(const char*, int);
- virtual const char* ice_name() const;
+ virtual const std::string ice_name() const;
virtual Exception* ice_clone() const;
virtual void ice_throw() const;
diff --git a/cpp/include/IceUtil/ThreadException.h b/cpp/include/IceUtil/ThreadException.h
index cc477754531..7faa1f54271 100644
--- a/cpp/include/IceUtil/ThreadException.h
+++ b/cpp/include/IceUtil/ThreadException.h
@@ -20,7 +20,7 @@ class ICE_UTIL_API ThreadSyscallException : public Exception
public:
ThreadSyscallException(const char*, int, int);
- virtual const char* ice_name() const;
+ virtual const std::string ice_name() const;
virtual void ice_print(std::ostream&) const;
virtual Exception* ice_clone() const;
virtual void ice_throw() const;
@@ -37,7 +37,7 @@ class ICE_UTIL_API ThreadLockedException : public Exception
public:
ThreadLockedException(const char*, int);
- virtual const char* ice_name() const;
+ virtual const std::string ice_name() const;
virtual Exception* ice_clone() const;
virtual void ice_throw() const;
@@ -51,7 +51,7 @@ class ICE_UTIL_API ThreadStartedException : public Exception
public:
ThreadStartedException(const char*, int);
- virtual const char* ice_name() const;
+ virtual const std::string ice_name() const;
virtual Exception* ice_clone() const;
virtual void ice_throw() const;
@@ -65,7 +65,7 @@ class ICE_UTIL_API ThreadNotStartedException : public Exception
public:
ThreadNotStartedException(const char*, int);
- virtual const char* ice_name() const;
+ virtual const std::string ice_name() const;
virtual Exception* ice_clone() const;
virtual void ice_throw() const;
diff --git a/cpp/include/IceUtil/UUID.h b/cpp/include/IceUtil/UUID.h
index 6ad57c26616..9747ceb334d 100644
--- a/cpp/include/IceUtil/UUID.h
+++ b/cpp/include/IceUtil/UUID.h
@@ -21,7 +21,7 @@ class ICE_UTIL_API UUIDGenerationException : public Exception
public:
UUIDGenerationException(const char*, int);
- virtual const char* ice_name() const;
+ virtual const std::string ice_name() const;
virtual Exception* ice_clone() const;
virtual void ice_throw() const;
diff --git a/cpp/include/IceXML/Parser.h b/cpp/include/IceXML/Parser.h
index 18986a30159..b38b2cd873a 100644
--- a/cpp/include/IceXML/Parser.h
+++ b/cpp/include/IceXML/Parser.h
@@ -35,7 +35,7 @@ public:
ParserException(const std::string&);
ParserException(const char*, int, const std::string&);
- virtual const char* ice_name() const;
+ virtual const std::string ice_name() const;
virtual void ice_print(std::ostream&) const;
virtual IceUtil::Exception* ice_clone() const;
virtual void ice_throw() const;
diff --git a/cpp/src/FreezeScript/Exception.cpp b/cpp/src/FreezeScript/Exception.cpp
index 2b76a9aae7c..519a3248682 100644
--- a/cpp/src/FreezeScript/Exception.cpp
+++ b/cpp/src/FreezeScript/Exception.cpp
@@ -21,7 +21,7 @@ FreezeScript::FailureException::FailureException(const char* file, int line, con
const char* FreezeScript::FailureException::_name = "FreezeScript::FailureException";
-const char*
+const string
FreezeScript::FailureException::ice_name() const
{
return _name;
diff --git a/cpp/src/FreezeScript/Exception.h b/cpp/src/FreezeScript/Exception.h
index 1c79f90c950..9bc6c10dc8b 100644
--- a/cpp/src/FreezeScript/Exception.h
+++ b/cpp/src/FreezeScript/Exception.h
@@ -20,7 +20,7 @@ class FailureException : public IceUtil::Exception
public:
FailureException(const char*, int, const std::string&);
- virtual const char* ice_name() const;
+ virtual const std::string ice_name() const;
virtual void ice_print(std::ostream&) const;
virtual IceUtil::Exception* ice_clone() const;
virtual void ice_throw() const;
diff --git a/cpp/src/FreezeScript/Parser.cpp b/cpp/src/FreezeScript/Parser.cpp
index f567f27d66a..99b11bd4ac8 100644
--- a/cpp/src/FreezeScript/Parser.cpp
+++ b/cpp/src/FreezeScript/Parser.cpp
@@ -128,7 +128,7 @@ FreezeScript::EvaluateException::EvaluateException(const char* file, int line, c
const char* FreezeScript::EvaluateException::_name = "FreezeScript::EvaluateException";
-const char*
+const string
FreezeScript::EvaluateException::ice_name() const
{
return _name;
diff --git a/cpp/src/FreezeScript/Parser.h b/cpp/src/FreezeScript/Parser.h
index 4c4af3bf9a9..da381850424 100644
--- a/cpp/src/FreezeScript/Parser.h
+++ b/cpp/src/FreezeScript/Parser.h
@@ -39,7 +39,7 @@ class EvaluateException : public IceUtil::Exception
public:
EvaluateException(const char*, int, const std::string&);
- virtual const char* ice_name() const;
+ virtual const std::string ice_name() const;
virtual void ice_print(std::ostream&) const;
virtual IceUtil::Exception* ice_clone() const;
virtual void ice_throw() const;
diff --git a/cpp/src/IceUtil/CtrlCHandler.cpp b/cpp/src/IceUtil/CtrlCHandler.cpp
index c738f915876..e6347d5eef9 100644
--- a/cpp/src/IceUtil/CtrlCHandler.cpp
+++ b/cpp/src/IceUtil/CtrlCHandler.cpp
@@ -31,7 +31,7 @@ CtrlCHandlerException::CtrlCHandlerException(const char* file, int line) :
static const char* ctrlCHandlerName = "IceUtil::CtrlCHandlerException";
-const char*
+const string
CtrlCHandlerException::ice_name() const
{
return ctrlCHandlerName;
diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp
index 12bbe20059c..038bf203a14 100644
--- a/cpp/src/IceUtil/Exception.cpp
+++ b/cpp/src/IceUtil/Exception.cpp
@@ -36,7 +36,7 @@ IceUtil::Exception::~Exception()
const char* IceUtil::Exception::_name = "IceUtil::Exception";
-const char*
+const string
IceUtil::Exception::ice_name() const
{
return _name;
@@ -94,7 +94,7 @@ IceUtil::NullHandleException::NullHandleException(const char* file, int line) :
const char* IceUtil::NullHandleException::_name = "IceUtil::NullHandleException";
-const char*
+const string
IceUtil::NullHandleException::ice_name() const
{
return _name;
diff --git a/cpp/src/IceUtil/ThreadException.cpp b/cpp/src/IceUtil/ThreadException.cpp
index eb6a96f19b3..abaa79f26a6 100644
--- a/cpp/src/IceUtil/ThreadException.cpp
+++ b/cpp/src/IceUtil/ThreadException.cpp
@@ -19,7 +19,7 @@ IceUtil::ThreadSyscallException::ThreadSyscallException(const char* file, int li
const char* IceUtil::ThreadSyscallException::_name = "IceUtil::ThreadSyscallException";
-const char*
+const string
IceUtil::ThreadSyscallException::ice_name() const
{
return _name;
@@ -87,7 +87,7 @@ IceUtil::ThreadLockedException::ThreadLockedException(const char* file, int line
const char* IceUtil::ThreadLockedException::_name = "IceUtil::ThreadLockedException";
-const char*
+const string
IceUtil::ThreadLockedException::ice_name() const
{
return _name;
@@ -112,7 +112,7 @@ IceUtil::ThreadStartedException::ThreadStartedException(const char* file, int li
const char* IceUtil::ThreadStartedException::_name = "IceUtil::ThreadStartedException";
-const char*
+const string
IceUtil::ThreadStartedException::ice_name() const
{
return _name;
@@ -137,7 +137,7 @@ IceUtil::ThreadNotStartedException::ThreadNotStartedException(const char* file,
const char* IceUtil::ThreadNotStartedException::_name = "IceUtil::ThreadNotStartedException";
-const char*
+const string
IceUtil::ThreadNotStartedException::ice_name() const
{
return _name;
diff --git a/cpp/src/IceUtil/UUID.cpp b/cpp/src/IceUtil/UUID.cpp
index 430a82ffc01..963215ae888 100644
--- a/cpp/src/IceUtil/UUID.cpp
+++ b/cpp/src/IceUtil/UUID.cpp
@@ -99,7 +99,7 @@ static UUIDCleanup uuidCleanup;
#endif
-const char*
+const string
IceUtil::UUIDGenerationException::ice_name() const
{
return _name;
diff --git a/cpp/src/IceXML/Parser.cpp b/cpp/src/IceXML/Parser.cpp
index b7d03341138..f5d980d1e3e 100644
--- a/cpp/src/IceXML/Parser.cpp
+++ b/cpp/src/IceXML/Parser.cpp
@@ -30,7 +30,7 @@ IceXML::ParserException::ParserException(const char* file, int line, const strin
const char* IceXML::ParserException::_name = "IceXML::ParserException";
-const char*
+const string
IceXML::ParserException::ice_name() const
{
return _name;
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index b0f192d379a..b333d58b2d0 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -414,12 +414,12 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
C << eb;
}
- H << nl << "virtual const char* ice_name() const;";
+ H << nl << "virtual const ::std::string ice_name() const;";
string flatName = p->flattenedScope() + p->name() + "_name";
C << sp << nl << "static const char* " << flatName << " = \"" << p->scoped().substr(2) << "\";";
- C << sp << nl << "const char*" << nl << scoped.substr(2) << "::ice_name() const";
+ C << sp << nl << "const ::std::string" << nl << scoped.substr(2) << "::ice_name() const";
C << sb;
C << nl << "return " << flatName << ';';
C << eb;
diff --git a/cpp/src/slice2cppe/Gen.cpp b/cpp/src/slice2cppe/Gen.cpp
index 196a98f0b62..2a70f308162 100644
--- a/cpp/src/slice2cppe/Gen.cpp
+++ b/cpp/src/slice2cppe/Gen.cpp
@@ -349,12 +349,12 @@ Slice::Gen::TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
C << eb;
}
- H << nl << "virtual const char* ice_name() const;";
+ H << nl << "virtual const ::std::string ice_name() const;";
string flatName = p->flattenedScope() + p->name() + "_name";
C << sp << nl << "static const char* " << flatName << " = \"" << p->scoped().substr(2) << "\";";
- C << sp << nl << "const char*" << nl << scoped.substr(2) << "::ice_name() const";
+ C << sp << nl << "const ::std::string" << nl << scoped.substr(2) << "::ice_name() const";
C << sb;
C << nl << "return " << flatName << ';';
C << eb;
diff --git a/cpp/test/Ice/slicing/exceptions/AllTests.cpp b/cpp/test/Ice/slicing/exceptions/AllTests.cpp
index cca027b20d3..e010fe75897 100644
--- a/cpp/test/Ice/slicing/exceptions/AllTests.cpp
+++ b/cpp/test/Ice/slicing/exceptions/AllTests.cpp
@@ -74,7 +74,7 @@ class AMI_Test_baseAsBaseI : public AMI_TestIntf_baseAsBase, public CallbackBase
catch(const Base& b)
{
test(b.b == "Base.b");
- test(string(b.ice_name()) =="Test::Base");
+ test(b.ice_name() =="Test::Base");
}
catch(...)
{
@@ -104,7 +104,7 @@ class AMI_Test_unknownDerivedAsBaseI : public AMI_TestIntf_unknownDerivedAsBase,
catch(const Base& b)
{
test(b.b == "UnknownDerived.b");
- test(string(b.ice_name()) =="Test::Base");
+ test(b.ice_name() =="Test::Base");
}
catch(...)
{
@@ -135,7 +135,7 @@ class AMI_Test_knownDerivedAsBaseI : public AMI_TestIntf_knownDerivedAsBase, pub
{
test(k.b == "KnownDerived.b");
test(k.kd == "KnownDerived.kd");
- test(string(k.ice_name()) =="Test::KnownDerived");
+ test(k.ice_name() =="Test::KnownDerived");
}
catch(...)
{
@@ -166,7 +166,7 @@ class AMI_Test_knownDerivedAsKnownDerivedI : public AMI_TestIntf_knownDerivedAsK
{
test(k.b == "KnownDerived.b");
test(k.kd == "KnownDerived.kd");
- test(string(k.ice_name()) =="Test::KnownDerived");
+ test(k.ice_name() =="Test::KnownDerived");
}
catch(...)
{
@@ -196,7 +196,7 @@ class AMI_Test_unknownIntermediateAsBaseI : public AMI_TestIntf_unknownIntermedi
catch(const Base& b)
{
test(b.b == "UnknownIntermediate.b");
- test(string(b.ice_name()) =="Test::Base");
+ test(b.ice_name() =="Test::Base");
}
catch(...)
{
@@ -227,7 +227,7 @@ class AMI_Test_knownIntermediateAsBaseI : public AMI_TestIntf_knownIntermediateA
{
test(ki.b == "KnownIntermediate.b");
test(ki.ki == "KnownIntermediate.ki");
- test(string(ki.ice_name()) =="Test::KnownIntermediate");
+ test(ki.ice_name() =="Test::KnownIntermediate");
}
catch(...)
{
@@ -260,7 +260,7 @@ class AMI_Test_knownMostDerivedAsBaseI : public AMI_TestIntf_knownMostDerivedAsB
test(kmd.b == "KnownMostDerived.b");
test(kmd.ki == "KnownMostDerived.ki");
test(kmd.kmd == "KnownMostDerived.kmd");
- test(string(kmd.ice_name()) =="Test::KnownMostDerived");
+ test(kmd.ice_name() =="Test::KnownMostDerived");
}
catch(...)
{
@@ -292,7 +292,7 @@ class AMI_Test_knownIntermediateAsKnownIntermediateI : public AMI_TestIntf_known
{
test(ki.b == "KnownIntermediate.b");
test(ki.ki == "KnownIntermediate.ki");
- test(string(ki.ice_name()) =="Test::KnownIntermediate");
+ test(ki.ice_name() =="Test::KnownIntermediate");
}
catch(...)
{
@@ -325,7 +325,7 @@ class AMI_Test_knownMostDerivedAsKnownMostDerivedI : public AMI_TestIntf_knownMo
test(kmd.b == "KnownMostDerived.b");
test(kmd.ki == "KnownMostDerived.ki");
test(kmd.kmd == "KnownMostDerived.kmd");
- test(string(kmd.ice_name()) =="Test::KnownMostDerived");
+ test(kmd.ice_name() =="Test::KnownMostDerived");
}
catch(...)
{
@@ -358,7 +358,7 @@ class AMI_Test_knownMostDerivedAsKnownIntermediateI : public AMI_TestIntf_knownM
test(kmd.b == "KnownMostDerived.b");
test(kmd.ki == "KnownMostDerived.ki");
test(kmd.kmd == "KnownMostDerived.kmd");
- test(string(kmd.ice_name()) =="Test::KnownMostDerived");
+ test(kmd.ice_name() =="Test::KnownMostDerived");
}
catch(...)
{
@@ -422,7 +422,7 @@ class AMI_Test_unknownMostDerived1AsKnownIntermediateI : public AMI_TestIntf_unk
{
test(ki.b == "UnknownMostDerived1.b");
test(ki.ki == "UnknownMostDerived1.ki");
- test(string(ki.ice_name()) =="Test::KnownIntermediate");
+ test(ki.ice_name() =="Test::KnownIntermediate");
}
catch(...)
{
@@ -454,7 +454,7 @@ class AMI_Test_unknownMostDerived2AsBaseI : public AMI_TestIntf_unknownMostDeriv
catch(const Base& b)
{
test(b.b == "UnknownMostDerived2.b");
- test(string(b.ice_name()) =="Test::Base");
+ test(b.ice_name() =="Test::Base");
}
catch(...)
{
@@ -482,7 +482,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
catch(const Base& b)
{
test(b.b == "Base.b");
- test(string(b.ice_name()) =="Test::Base");
+ test(b.ice_name() =="Test::Base");
gotException = true;
}
catch(...)
@@ -511,7 +511,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
catch(const Base& b)
{
test(b.b == "UnknownDerived.b");
- test(string(b.ice_name()) =="Test::Base");
+ test(b.ice_name() =="Test::Base");
gotException = true;
}
catch(...)
@@ -541,7 +541,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
{
test(k.b == "KnownDerived.b");
test(k.kd == "KnownDerived.kd");
- test(string(k.ice_name()) =="Test::KnownDerived");
+ test(k.ice_name() =="Test::KnownDerived");
gotException = true;
}
catch(...)
@@ -571,7 +571,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
{
test(k.b == "KnownDerived.b");
test(k.kd == "KnownDerived.kd");
- test(string(k.ice_name()) =="Test::KnownDerived");
+ test(k.ice_name() =="Test::KnownDerived");
gotException = true;
}
catch(...)
@@ -600,7 +600,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
catch(const Base& b)
{
test(b.b == "UnknownIntermediate.b");
- test(string(b.ice_name()) =="Test::Base");
+ test(b.ice_name() =="Test::Base");
gotException = true;
}
catch(...)
@@ -630,7 +630,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
{
test(ki.b == "KnownIntermediate.b");
test(ki.ki == "KnownIntermediate.ki");
- test(string(ki.ice_name()) =="Test::KnownIntermediate");
+ test(ki.ice_name() =="Test::KnownIntermediate");
gotException = true;
}
catch(...)
@@ -661,7 +661,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(kmd.b == "KnownMostDerived.b");
test(kmd.ki == "KnownMostDerived.ki");
test(kmd.kmd == "KnownMostDerived.kmd");
- test(string(kmd.ice_name()) =="Test::KnownMostDerived");
+ test(kmd.ice_name() =="Test::KnownMostDerived");
gotException = true;
}
catch(...)
@@ -691,7 +691,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
{
test(ki.b == "KnownIntermediate.b");
test(ki.ki == "KnownIntermediate.ki");
- test(string(ki.ice_name()) =="Test::KnownIntermediate");
+ test(ki.ice_name() =="Test::KnownIntermediate");
gotException = true;
}
catch(...)
@@ -722,7 +722,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(kmd.b == "KnownMostDerived.b");
test(kmd.ki == "KnownMostDerived.ki");
test(kmd.kmd == "KnownMostDerived.kmd");
- test(string(kmd.ice_name()) =="Test::KnownMostDerived");
+ test(kmd.ice_name() =="Test::KnownMostDerived");
gotException = true;
}
catch(...)
@@ -753,7 +753,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(kmd.b == "KnownMostDerived.b");
test(kmd.ki == "KnownMostDerived.ki");
test(kmd.kmd == "KnownMostDerived.kmd");
- test(string(kmd.ice_name()) =="Test::KnownMostDerived");
+ test(kmd.ice_name() =="Test::KnownMostDerived");
gotException = true;
}
catch(...)
@@ -783,7 +783,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
{
test(ki.b == "UnknownMostDerived1.b");
test(ki.ki == "UnknownMostDerived1.ki");
- test(string(ki.ice_name()) =="Test::KnownIntermediate");
+ test(ki.ice_name() =="Test::KnownIntermediate");
gotException = true;
}
catch(...)
@@ -813,7 +813,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
{
test(ki.b == "UnknownMostDerived1.b");
test(ki.ki == "UnknownMostDerived1.ki");
- test(string(ki.ice_name()) =="Test::KnownIntermediate");
+ test(ki.ice_name() =="Test::KnownIntermediate");
gotException = true;
}
catch(...)
@@ -842,7 +842,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
catch(const Base& b)
{
test(b.b == "UnknownMostDerived2.b");
- test(string(b.ice_name()) =="Test::Base");
+ test(b.ice_name() =="Test::Base");
gotException = true;
}
catch(...)
diff --git a/cpp/test/Ice/slicing/objects/AllTests.cpp b/cpp/test/Ice/slicing/objects/AllTests.cpp
index ef984c72ddb..0aee070e05e 100644
--- a/cpp/test/Ice/slicing/objects/AllTests.cpp
+++ b/cpp/test/Ice/slicing/objects/AllTests.cpp
@@ -514,7 +514,7 @@ class AMI_Test_throwBaseAsBaseI : public AMI_TestIntf_throwBaseAsBase, public Ca
virtual void
ice_exception(const ::Ice::Exception& ex)
{
- test(string(ex.ice_name()) == "Test::BaseException");
+ test(ex.ice_name() == "Test::BaseException");
const BaseException& e = dynamic_cast<const BaseException&>(ex);
test(e.sbe == "sbe");
test(e.pb);
@@ -537,7 +537,7 @@ class AMI_Test_throwDerivedAsBaseI : public AMI_TestIntf_throwDerivedAsBase, pub
virtual void
ice_exception(const ::Ice::Exception& ex)
{
- test(string(ex.ice_name()) == "Test::DerivedException");
+ test(ex.ice_name() == "Test::DerivedException");
const DerivedException& e = dynamic_cast<const DerivedException&>(ex);
test(e.sbe == "sbe");
test(e.pb);
@@ -566,7 +566,7 @@ class AMI_Test_throwDerivedAsDerivedI : public AMI_TestIntf_throwDerivedAsDerive
virtual void
ice_exception(const ::Ice::Exception& ex)
{
- test(string(ex.ice_name()) == "Test::DerivedException");
+ test(ex.ice_name() == "Test::DerivedException");
const DerivedException& e = dynamic_cast<const DerivedException&>(ex);
test(e.sbe == "sbe");
test(e.pb);
@@ -595,7 +595,7 @@ class AMI_Test_throwUnknownDerivedAsBaseI : public AMI_TestIntf_throwUnknownDeri
virtual void
ice_exception(const ::Ice::Exception& ex)
{
- test(string(ex.ice_name()) == "Test::BaseException");
+ test(ex.ice_name() == "Test::BaseException");
const BaseException& e = dynamic_cast<const BaseException&>(ex);
test(e.sbe == "sbe");
test(e.pb);
@@ -1755,7 +1755,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
catch(const BaseException& e)
{
- test(string(e.ice_name()) == "Test::BaseException");
+ test(e.ice_name() == "Test::BaseException");
test(e.sbe == "sbe");
test(e.pb);
test(e.pb->sb == "sb");
@@ -1785,7 +1785,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
catch(const DerivedException& e)
{
- test(string(e.ice_name()) == "Test::DerivedException");
+ test(e.ice_name() == "Test::DerivedException");
test(e.sbe == "sbe");
test(e.pb);
test(e.pb->sb == "sb1");
@@ -1821,7 +1821,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
catch(const DerivedException& e)
{
- test(string(e.ice_name()) == "Test::DerivedException");
+ test(e.ice_name() == "Test::DerivedException");
test(e.sbe == "sbe");
test(e.pb);
test(e.pb->sb == "sb1");
@@ -1857,7 +1857,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
catch(const BaseException& e)
{
- test(string(e.ice_name()) == "Test::BaseException");
+ test(e.ice_name() == "Test::BaseException");
test(e.sbe == "sbe");
test(e.pb);
test(e.pb->sb == "sb d2");