summaryrefslogtreecommitdiffstats
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-29 08:46:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-29 09:57:15 +0100
commit933660e591211f06a1be43e83c64ad1e8529bc2f (patch)
treeadc0ede7c30c9ee5af7b75e649c806831f73da41 /sal
parentRevert "comment out the EvaluateAsInt compat code for now" (diff)
downloadcore-933660e591211f06a1be43e83c64ad1e8529bc2f.tar.gz
core-933660e591211f06a1be43e83c64ad1e8529bc2f.zip
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r--sal/qa/rtl/strings/test_ostring.cxx6
1 files changed, 3 insertions, 3 deletions
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);
}