summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-16 15:23:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-17 08:25:47 +0200
commitccb2a1f650bc505f8a4f1abebf8ce4f9396562a8 (patch)
tree2ee2fd4f300ae95cf23bade1f242e02f9b276c07 /sc/qa
parentda5c3a1ee43dd1a07cbd1b8005488bf05432593d (diff)
clang-tidy readability-redundant-smartptr-get
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx8
-rw-r--r--sc/qa/unit/ucalc_condformat.cxx2
-rw-r--r--sc/qa/unit/ucalc_formula.cxx4
3 files changed, 7 insertions, 7 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index a2993d216e88..d10794a197d7 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -2305,8 +2305,8 @@ void ScFiltersTest::testCondFormatThemeColorXLSX()
const ScDataBarFormatData* pDataBarFormatData = pDataBar->GetDataBarData();
CPPUNIT_ASSERT_EQUAL(Color(157, 195, 230), pDataBarFormatData->maPositiveColor);
- CPPUNIT_ASSERT(pDataBarFormatData->mpNegativeColor.get());
- CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, *pDataBarFormatData->mpNegativeColor.get());
+ CPPUNIT_ASSERT(pDataBarFormatData->mpNegativeColor);
+ CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, *pDataBarFormatData->mpNegativeColor);
CPPUNIT_ASSERT_EQUAL(size_t(1), rDoc.GetCondFormList(1)->size());
pFormat = rDoc.GetCondFormat(0, 0, 1);
@@ -2344,8 +2344,8 @@ void ScFiltersTest::testCondFormatThemeColor2XLSX()
const ScDataBarFormatData* pDataBarFormatData = pDataBar->GetDataBarData();
CPPUNIT_ASSERT_EQUAL(Color(99, 142, 198), pDataBarFormatData->maPositiveColor);
- CPPUNIT_ASSERT(pDataBarFormatData->mpNegativeColor.get());
- CPPUNIT_ASSERT_EQUAL(Color(217, 217, 217), *pDataBarFormatData->mpNegativeColor.get());
+ CPPUNIT_ASSERT(pDataBarFormatData->mpNegativeColor);
+ CPPUNIT_ASSERT_EQUAL(Color(217, 217, 217), *pDataBarFormatData->mpNegativeColor);
CPPUNIT_ASSERT_EQUAL(Color(197, 90, 17), pDataBarFormatData->maAxisColor);
xDocSh->DoClose();
diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx
index c3b5694f30a9..ad64e51e4853 100644
--- a/sc/qa/unit/ucalc_condformat.cxx
+++ b/sc/qa/unit/ucalc_condformat.cxx
@@ -623,7 +623,7 @@ void testDataBarLengthImpl(ScDocument* pDoc, ScDataBarLengthData* pData, const S
for (size_t i = 0; pData[i].nLength != -200; ++i)
{
std::unique_ptr<ScDataBarInfo> xInfo(pDatabar->GetDataBarInfo(ScAddress(nCol, i, 0)));
- CPPUNIT_ASSERT(xInfo.get());
+ CPPUNIT_ASSERT(xInfo);
ASSERT_DOUBLES_EQUAL(pData[i].nLength, xInfo->mnLength);
ASSERT_DOUBLES_EQUAL(nZeroPos, xInfo->mnZero);
}
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 15efbbf09b36..6bfccbc97bdc 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -1005,7 +1005,7 @@ void Test::testFormulaCompiler()
std::unique_ptr<ScTokenArray> pArray;
{
pArray.reset(compileFormula(m_pDoc, OUString::createFromAscii(aTests[i].pInput), aTests[i].eInputGram));
- CPPUNIT_ASSERT_MESSAGE("Token array shouldn't be NULL!", pArray.get());
+ CPPUNIT_ASSERT_MESSAGE("Token array shouldn't be NULL!", pArray);
}
OUString aFormula = toString(*m_pDoc, ScAddress(), *pArray, aTests[i].eOutputGram);
@@ -1033,7 +1033,7 @@ void Test::testFormulaCompilerJumpReordering()
// Compile formula string first.
std::unique_ptr<ScTokenArray> pCode(compileFormula(m_pDoc, aInput));
- CPPUNIT_ASSERT(pCode.get());
+ CPPUNIT_ASSERT(pCode);
// Then generate RPN tokens.
ScCompiler aCompRPN(m_pDoc, ScAddress(), *pCode, FormulaGrammar::GRAM_NATIVE);