From 933660e591211f06a1be43e83c64ad1e8529bc2f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 29 Nov 2018 08:46:47 +0200 Subject: loplugin:stringconstant look for unnecessary OString constructor use and tweak the methods in check.hxx to make them more flexible when called with dc.Class(xxx ? "foo" : "bar") Change-Id: I881fe628f22121ced4d8849715d6b1c92b092da1 Reviewed-on: https://gerrit.libreoffice.org/64207 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sal/qa/rtl/strings/test_ostring.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sal') diff --git a/sal/qa/rtl/strings/test_ostring.cxx b/sal/qa/rtl/strings/test_ostring.cxx index 3732f7488bde..32738125f92a 100644 --- a/sal/qa/rtl/strings/test_ostring.cxx +++ b/sal/qa/rtl/strings/test_ostring.cxx @@ -43,19 +43,19 @@ void Test::testStartsWithIgnoreAsciiCase() { { OString r; CPPUNIT_ASSERT( - OString("foo").startsWithIgnoreAsciiCase(OString("F"), &r)); + OString("foo").startsWithIgnoreAsciiCase("F", &r)); CPPUNIT_ASSERT_EQUAL(OString("oo"), r); } { OString r("other"); CPPUNIT_ASSERT( - !OString("foo").startsWithIgnoreAsciiCase(OString("bar"), &r)); + !OString("foo").startsWithIgnoreAsciiCase("bar", &r)); CPPUNIT_ASSERT_EQUAL(OString("other"), r); } { OString r("other"); CPPUNIT_ASSERT( - !OString("foo").startsWithIgnoreAsciiCase(OString("foobar"), &r)); + !OString("foo").startsWithIgnoreAsciiCase("foobar", &r)); CPPUNIT_ASSERT_EQUAL(OString("other"), r); } -- cgit