summaryrefslogtreecommitdiff
path: root/tools/source/memtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-01 14:23:45 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-04 09:09:39 +0000
commit953f8f2cfecbe3005eb7de84daf1c9d86379244c (patch)
tree6cfd12b025f709c6d27c319e1597c9e5122198ed /tools/source/memtools
parente099c5bdaa458105148059228ec11c98b9d13029 (diff)
loplugin:constantparam in tools
Change-Id: I8b2a722b525722bd09ed1f27c648062d6f29cce7 Reviewed-on: https://gerrit.libreoffice.org/23723 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'tools/source/memtools')
-rw-r--r--tools/source/memtools/multisel.cxx25
1 files changed, 11 insertions, 14 deletions
diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx
index d671130bc650..9e17b76ff907 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -561,22 +561,19 @@ bool StringRangeEnumerator::checkValue( sal_Int32 i_nValue, const std::set< sal_
return true;
}
-bool StringRangeEnumerator::insertRange( sal_Int32 i_nFirst, sal_Int32 i_nLast, bool bSequence, bool bMayAdjust )
+bool StringRangeEnumerator::insertRange( sal_Int32 i_nFirst, sal_Int32 i_nLast, bool bSequence )
{
bool bSuccess = true;
if( bSequence )
{
- if( bMayAdjust )
- {
- if( i_nFirst < mnMin )
- i_nFirst = mnMin;
- if( i_nFirst > mnMax )
- i_nFirst = mnMax;
- if( i_nLast < mnMin )
- i_nLast = mnMin;
- if( i_nLast > mnMax )
- i_nLast = mnMax;
- }
+ if( i_nFirst < mnMin )
+ i_nFirst = mnMin;
+ if( i_nFirst > mnMax )
+ i_nFirst = mnMax;
+ if( i_nLast < mnMin )
+ i_nLast = mnMin;
+ if( i_nLast > mnMax )
+ i_nLast = mnMax;
if( checkValue( i_nFirst ) && checkValue( i_nLast ) )
{
maSequence.push_back( Range( i_nFirst, i_nLast ) );
@@ -614,7 +611,7 @@ bool StringRangeEnumerator::insertJoinedRanges(
return true;
if( nCount == 1 )
- return insertRange( rNumbers[0], -1, false, true );
+ return insertRange( rNumbers[0], -1, false );
for( size_t i = 0; i < nCount - 1; i++ )
{
@@ -626,7 +623,7 @@ bool StringRangeEnumerator::insertJoinedRanges(
else if( nFirst < nLast ) nFirst++;
}
- insertRange( nFirst, nLast, nFirst != nLast, true );
+ insertRange( nFirst, nLast, nFirst != nLast );
}
return true;