diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2016-10-31 17:51:34 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2016-11-01 00:54:03 +0000 |
commit | 9fa6dadc4e1e75b2fd7b7360995c524fa7a5d40e (patch) | |
tree | d0c597087c12b5e58424755cf7c5164c2c185b38 | |
parent | 3950166877bf1308f9e449992e20b558342af825 (diff) |
Omit the default comparator for std::sort()
Change-Id: Ib865bdf911b53d809fc2979f524da3735bb39ce5
Reviewed-on: https://gerrit.libreoffice.org/30432
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
-rw-r--r-- | chart2/source/tools/DataSeriesHelper.cxx | 10 | ||||
-rw-r--r-- | sc/source/core/data/dpoutput.cxx | 7 |
2 files changed, 3 insertions, 14 deletions
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx index b3fda1c72937..830f229c02dd 100644 --- a/chart2/source/tools/DataSeriesHelper.cxx +++ b/chart2/source/tools/DataSeriesHelper.cxx @@ -723,14 +723,6 @@ bool hasUnhiddenData( const uno::Reference< chart2::XDataSeries >& xSeries ) return false; } -struct lcl_LessIndex -{ - inline bool operator() ( sal_Int32 first, sal_Int32 second ) const - { - return ( first < second ); - } -}; - sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nIndex, const Reference< chart2::data::XDataSequence >& xDataSequence, bool bTranslate ) { if( !bTranslate ) @@ -746,7 +738,7 @@ sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nIndex, const Refere if( aHiddenIndicesSeq.getLength() ) { ::std::vector< sal_Int32 > aHiddenIndices( ContainerHelper::SequenceToVector( aHiddenIndicesSeq ) ); - ::std::sort( aHiddenIndices.begin(), aHiddenIndices.end(), lcl_LessIndex() ); + ::std::sort( aHiddenIndices.begin(), aHiddenIndices.end() ); sal_Int32 nHiddenCount = static_cast<sal_Int32>(aHiddenIndices.size()); for( sal_Int32 nN = 0; nN < nHiddenCount; ++nN) diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 390aaf67592d..ff6c2daa7f9a 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -107,9 +107,6 @@ struct ScDPOutLevelData namespace { -bool lcl_compareColfuc ( SCCOL i, SCCOL j) { return (i<j); } -bool lcl_compareRowfuc ( SCROW i, SCROW j) { return (i<j); } - class ScDPOutputImpl { ScDocument* mpDoc; @@ -154,8 +151,8 @@ void ScDPOutputImpl::OutputDataArea() bool bAllRows = ( ( mnTabEndRow - mnDataStartRow + 2 ) == (SCROW) mnRows.size() ); - std::sort( mnCols.begin(), mnCols.end(), lcl_compareColfuc ); - std::sort( mnRows.begin(), mnRows.end(), lcl_compareRowfuc ); + std::sort( mnCols.begin(), mnCols.end() ); + std::sort( mnRows.begin(), mnRows.end() ); for( SCCOL nCol = 0; nCol < (SCCOL)mnCols.size()-1; nCol ++ ) { |