From c5e4534808c03ce30c7b3e4bbed38ed5fca2d77f Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Thu, 6 Jul 2017 19:36:34 +0200 Subject: remove nullptr checks on STL search result iterators results are in the range of first_iterator to last_iterator. If one of those is nullptr the algorithm would fail anyway. This removes some impossible checks in sw/source/core/unocore/unochart.cxx: SwChartDataProvider::detectArguments. A sorted range still holds the same values and has the same length as the original range. Replacing raw pointers eases reading this code. Change-Id: If96bd11e9167488346a57e9e08507ac42338d3cd Reviewed-on: https://gerrit.libreoffice.org/39683 Tested-by: Jenkins Reviewed-by: Noel Grandin --- chart2/qa/extras/chart2export.cxx | 1 - 1 file changed, 1 deletion(-) (limited to 'chart2/qa/extras') diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 89ae67d570d6..11f37235835b 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -205,7 +205,6 @@ OUString findChartFile(const OUString& rDir, uno::Reference< container::XNameAcc uno::Sequence aNames = xNames->getElementNames(); OUString* pElement = std::find_if(aNames.begin(), aNames.end(), CheckForChartName(rDir)); - CPPUNIT_ASSERT(pElement); CPPUNIT_ASSERT(pElement != aNames.end()); return *pElement; } -- cgit v1.2.3