From cae9240a76cdb0eeed92421930d3b4cbef0ac201 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 28 Aug 2019 08:42:39 +0200 Subject: Avoid adding a function declaration to namespace std Change-Id: Id6839850f249f2065de05a0fd929e68ca1003ec6 Reviewed-on: https://gerrit.libreoffice.org/78213 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- slideshow/source/engine/slide/layermanager.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx index 595dd6abe757..a85317d20512 100644 --- a/slideshow/source/engine/slide/layermanager.cxx +++ b/slideshow/source/engine/slide/layermanager.cxx @@ -33,10 +33,10 @@ using namespace ::com::sun::star; -namespace std +namespace { // add operator!= for weak_ptr - static bool operator!=( slideshow::internal::LayerWeakPtr const& rLHS, + bool notEqual( slideshow::internal::LayerWeakPtr const& rLHS, slideshow::internal::LayerWeakPtr const& rRHS ) { return rLHS.lock().get() != rRHS.lock().get(); @@ -758,7 +758,7 @@ namespace slideshow bIsBackgroundLayer = false; if( aWeakLayers.size() <= nCurrLayerIndex || - aWeakLayers.at(nCurrLayerIndex) != aCurrShapeEntry->second ) + notEqual(aWeakLayers.at(nCurrLayerIndex), aCurrShapeEntry->second) ) { // no more layers left, or shape was not // member of this layer - create a new one @@ -775,7 +775,7 @@ namespace slideshow // above invalidates iterators LayerSharedPtr& rCurrLayer( maLayers.at(nCurrLayerIndex) ); LayerWeakPtr& rCurrWeakLayer( aWeakLayers.at(nCurrLayerIndex) ); - if( rCurrWeakLayer != aCurrShapeEntry->second ) + if( notEqual(rCurrWeakLayer, aCurrShapeEntry->second) ) { // mismatch: shape is not contained in current // layer - move shape to that layer, then. -- cgit