diff --git a/Foundation/src/Format.cpp b/Foundation/src/Format.cpp index 821f523aa..9a934a8bc 100644 --- a/Foundation/src/Format.cpp +++ b/Foundation/src/Format.cpp @@ -206,16 +206,8 @@ namespace } break; case 's': - { - const Any& val = *itVal++; - if (val.type() == typeid(char*)) - str << AnyCast(val); - else if (val.type() == typeid(const char*)) - str << AnyCast(val); - else - str << RefAnyCast(val); + str << RefAnyCast(*itVal++); break; - } case 'z': str << AnyCast(*itVal++); break; diff --git a/Foundation/testsuite/src/FormatTest.cpp b/Foundation/testsuite/src/FormatTest.cpp index 86b45759b..e922c724e 100644 --- a/Foundation/testsuite/src/FormatTest.cpp +++ b/Foundation/testsuite/src/FormatTest.cpp @@ -306,12 +306,6 @@ void FormatTest::testString() std::string s(format("%s", foo)); assert (s == "foo"); - s = format("%s", "foo"); - assert (s == "foo"); - - s = format("%s", static_cast("foo")); - assert (s == "foo"); - s = format("%5s", foo); assert (s == " foo");