diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-30 16:41:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-31 08:33:54 +0200 |
commit | b08217989558addbcaded122a4e7211ae24bbcff (patch) | |
tree | 9ba60dba293d071482a309985e1c7d7ff5a5a955 /sc/qa/unit | |
parent | 307be8c9cedb32560419bbb09e029b906e5f1acd (diff) |
clang-tidy readability-redundant-string-cstr
and readability-redundant-string-init
Change-Id: I7b25659ace9e1d5be042ec5e179f01191693334e
Reviewed-on: https://gerrit.libreoffice.org/38225
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/qa/unit')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_formula.cxx | 10 | ||||
-rw-r--r-- | sc/qa/unit/ucalc_pivottable.cxx | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 9cb6f345ee1b..94d04e2f433f 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -759,7 +759,7 @@ void Test::testMarkedCellIteration() { std::ostringstream os; os << ScAddress(rCheck.mnCol, rCheck.mnRow, 0).GetColRowString() << " was expected, but not found."; - CPPUNIT_FAIL(os.str().data()); + CPPUNIT_FAIL(os.str()); } CPPUNIT_ASSERT_EQUAL(rCheck.mnRow, nRow); diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index b5c5f9f85879..312ac3328a9e 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -844,12 +844,12 @@ void Test::testFormulaHashAndTag() if (aHashTests[i].bEqual) { os << " Error: these hashes should be equal." << endl; - CPPUNIT_ASSERT_EQUAL_MESSAGE(os.str().c_str(), nHashVal1, nHashVal2); + CPPUNIT_ASSERT_EQUAL_MESSAGE(os.str(), nHashVal1, nHashVal2); } else { os << " Error: these hashes should differ." << endl; - CPPUNIT_ASSERT_MESSAGE(os.str().c_str(), nHashVal1 != nHashVal2); + CPPUNIT_ASSERT_MESSAGE(os.str(), nHashVal1 != nHashVal2); } aPos1.IncRow(); @@ -896,7 +896,7 @@ void Test::testFormulaHashAndTag() { std::ostringstream os; os << "Unexpected vectorization state: expr: '" << aVectorTests[i].pFormula << "', using software interpreter: " << bForceSwInterpreter; - CPPUNIT_ASSERT_MESSAGE(os.str().c_str(), false); + CPPUNIT_ASSERT_MESSAGE(os.str(), false); } aPos1.IncRow(); } @@ -949,7 +949,7 @@ void Test::testFormulaTokenEquality() std::ostringstream os; os << "These two formulas should be evaluated equal: '" << aTests[i].mpFormula1 << "' vs '" << aTests[i].mpFormula2 << "'" << endl; - CPPUNIT_FAIL(os.str().c_str()); + CPPUNIT_FAIL(os.str()); } } else @@ -959,7 +959,7 @@ void Test::testFormulaTokenEquality() std::ostringstream os; os << "These two formulas should be evaluated non-equal: '" << aTests[i].mpFormula1 << "' vs '" << aTests[i].mpFormula2 << "'" << endl; - CPPUNIT_FAIL(os.str().c_str()); + CPPUNIT_FAIL(os.str()); } } } diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx index a74b8d4793d2..7f286a6e3b89 100644 --- a/sc/qa/unit/ucalc_pivottable.cxx +++ b/sc/qa/unit/ucalc_pivottable.cxx @@ -932,7 +932,7 @@ void Test::testPivotTableCache() { std::ostringstream os; os << "Row " << i << " should be visible but it isn't."; - CPPUNIT_ASSERT_MESSAGE(os.str().c_str(), false); + CPPUNIT_ASSERT_MESSAGE(os.str(), false); } } } |