From df645a2bd8a9b5463c74f261268f0d2de7245ccc Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Sat, 14 Jul 2012 18:00:06 +0200 Subject: There is not need to allocate memory just for getting the 'indexOf' a literal within a OUString. Change-Id: I01ca30c68228f81b3d313dfca5b975448f3c4fc7 --- cppuhelper/test/bootstrap/bootstrap.test.cxx | 2 +- cppuhelper/test/loader/loader.test.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'cppuhelper') diff --git a/cppuhelper/test/bootstrap/bootstrap.test.cxx b/cppuhelper/test/bootstrap/bootstrap.test.cxx index 0b8e78a846d7..ebbb5ca24cc6 100644 --- a/cppuhelper/test/bootstrap/bootstrap.test.cxx +++ b/cppuhelper/test/bootstrap/bootstrap.test.cxx @@ -291,7 +291,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv) s_test__bootstrap_InitialComponentContext__purpose(); int ret; - if (s_comment.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILURE"))) == -1) + if (s_comment.indexOf("FAILURE") == -1) { s_comment += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n")); ret = 0; diff --git a/cppuhelper/test/loader/loader.test.cxx b/cppuhelper/test/loader/loader.test.cxx index 6c9d47c5cdde..466f243f52dc 100644 --- a/cppuhelper/test/loader/loader.test.cxx +++ b/cppuhelper/test/loader/loader.test.cxx @@ -182,7 +182,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(/*argc*/, argv) message += s_test__cppu_writeSharedLibComponentInfo(":affine"); message += s_test__cppu_writeSharedLibComponentInfo(""); - if (message.indexOf(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FAILED"))) == -1) + if (message.indexOf("FAILED") == -1) message += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TESTS PASSED\n")); else -- cgit