From f6cfbe8a1f9dc8535a69e2ad0c21e87c2a63a82a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 30 Oct 2017 14:43:24 +0200 Subject: loplugin:constantparam in sc Change-Id: I2a55811f1741341c30f84ea3d010cc12eb6f2df9 Reviewed-on: https://gerrit.libreoffice.org/44086 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/inc/fstalgorithm.hxx | 10 +++------- sc/inc/postit.hxx | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'sc/inc') diff --git a/sc/inc/fstalgorithm.hxx b/sc/inc/fstalgorithm.hxx index 73a4c5c3d64a..2a6ec14ddf2a 100644 --- a/sc/inc/fstalgorithm.hxx +++ b/sc/inc/fstalgorithm.hxx @@ -48,7 +48,7 @@ template void buildSpanWithValue( std::vector& rSpans, typename mdds::flat_segment_tree::const_iterator it, - typename mdds::flat_segment_tree::const_iterator itEnd, const Key* pStart ) + typename mdds::flat_segment_tree::const_iterator itEnd ) { Key nLastPos = it->first; Val nLastVal = it->second; @@ -61,11 +61,7 @@ void buildSpanWithValue( { Key nIndex1 = nLastPos; Key nIndex2 = nThisPos-1; - - if (!pStart || *pStart < nIndex1) - rSpans.push_back(Span(nIndex1, nIndex2, nLastVal)); - else if (*pStart <= nIndex2) - rSpans.push_back(Span(*pStart, nIndex2, nLastVal)); + rSpans.push_back(Span(nIndex1, nIndex2, nLastVal)); } nLastPos = nThisPos; @@ -105,7 +101,7 @@ std::vector toSpanArrayWithValue( const mdds::flat_segment_tree& std::vector aSpans; typename FstType::const_iterator it = rTree.begin(), itEnd = rTree.end(); - buildSpanWithValue(aSpans, it, itEnd, nullptr); + buildSpanWithValue(aSpans, it, itEnd); return aSpans; } diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx index ba7d2705fb04..c13169f1b960 100644 --- a/sc/inc/postit.hxx +++ b/sc/inc/postit.hxx @@ -304,7 +304,7 @@ public: */ static ScPostIt* CreateNoteFromCaption( ScDocument& rDoc, const ScAddress& rPos, - SdrCaptionObj* pCaption, bool bShown ); + SdrCaptionObj* pCaption ); /** Creates a cell note based on the passed caption object data. @@ -341,7 +341,7 @@ public: ScDocument& rDoc, const ScAddress& rPos, SfxItemSet* pItemSet, OutlinerParaObject* pOutlinerObj, const tools::Rectangle& rCaptionRect, bool bShown, - bool bAlwaysCreateCaption, sal_uInt32 nPostItId = 0 ); + bool bAlwaysCreateCaption ); /** Creates a cell note based on the passed string and inserts it into the document. -- cgit