diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-19 08:12:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-19 10:02:39 +0200 |
commit | 2c1b7e8d6a7fa22cb91919238418816671c3a497 (patch) | |
tree | 6f356017d24dffcd25261295ab25a21b738dc835 /chart2 | |
parent | ad18bb24d51e4f735085d50c496d28bd637dbb0b (diff) |
clang-tidy readability-container-size-empty
Change-Id: I1df70b7dff5ebb6048f7fc618789faa15ca5d422
Reviewed-on: https://gerrit.libreoffice.org/61967
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
6 files changed, 7 insertions, 7 deletions
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 2a05b9303f5f..c554cf3f7f30 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -1453,7 +1453,7 @@ bool WrappedNumberOfLinesProperty::detectInnerValue( uno::Any& rInnerValue ) con { std::vector< uno::Reference< chart2::XDataSeries > > aSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) ); - if( aSeriesVector.size() > 0 ) + if( !aSeriesVector.empty() ) { Reference< lang::XMultiServiceFactory > xFact( xChartDoc->getChartTypeManager(), uno::UNO_QUERY ); DiagramHelper::tTemplateWithServiceName aTemplateAndService = diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx index 4ede52c2bec9..ce856e20b60a 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx @@ -131,7 +131,7 @@ css::uno::Any WrappedVolumeProperty::getPropertyValue( const css::uno::Reference { std::vector< uno::Reference< chart2::XDataSeries > > aSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) ); - if( aSeriesVector.size() > 0 ) + if( !aSeriesVector.empty() ) { Reference< lang::XMultiServiceFactory > xFact( xChartDoc->getChartTypeManager(), uno::UNO_QUERY ); DiagramHelper::tTemplateWithServiceName aTemplateAndService = @@ -196,7 +196,7 @@ css::uno::Any WrappedUpDownProperty::getPropertyValue( const css::uno::Reference { std::vector< uno::Reference< chart2::XDataSeries > > aSeriesVector( DiagramHelper::getDataSeriesFromDiagram( xDiagram ) ); - if( aSeriesVector.size() > 0 ) + if( !aSeriesVector.empty() ) { Reference< lang::XMultiServiceFactory > xFact( xChartDoc->getChartTypeManager(), uno::UNO_QUERY ); DiagramHelper::tTemplateWithServiceName aTemplateAndService = diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx index 0e627e6787e6..61b531cfc419 100644 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -482,7 +482,7 @@ void SAL_CALL Diagram::addCoordinateSystem( != m_aCoordSystems.end()) throw lang::IllegalArgumentException(); - if( m_aCoordSystems.size()>=1 ) + if( !m_aCoordSystems.empty() ) { OSL_FAIL( "more than one coordinatesystem is not supported yet by the fileformat" ); return; diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index 70e8e62f5824..6c50ba35aeea 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -924,7 +924,7 @@ void BarChart::createShapes() for( auto const& rZSlot : m_aZSlots ) { BarPositionHelper* pPosHelper = m_pMainPosHelper.get(); - if( rZSlot.size() ) + if( !rZSlot.empty() ) { sal_Int32 nAttachedAxisIndex = rZSlot.front().getAttachedAxisIndexForFirstSeries(); //2ND_AXIS_IN_BARS so far one can assume to have the same plotter for each z slot diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx index cff376eac322..e3ed188f4ea7 100644 --- a/chart2/source/view/charttypes/CandleStickChart.cxx +++ b/chart2/source/view/charttypes/CandleStickChart.cxx @@ -145,7 +145,7 @@ void CandleStickChart::createShapes() { sal_Int32 nAttachedAxisIndex = 0; BarPositionHelper* pPosHelper = m_pMainPosHelper.get(); - if( rZSlot.size() ) + if( !rZSlot.empty() ) { nAttachedAxisIndex = rZSlot.front().getAttachedAxisIndexForFirstSeries(); //2ND_AXIS_IN_BARS so far one can assume to have the same plotter for each z slot diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 0a3716df0f98..47fe81a1ab98 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1573,7 +1573,7 @@ double VSeriesPlotter::getMinimumZ() } double VSeriesPlotter::getMaximumZ() { - if( m_nDimension!=3 || !m_aZSlots.size() ) + if( m_nDimension!=3 || m_aZSlots.empty() ) return getMinimumZ()+1; return m_aZSlots.size(); } |