[Libreoffice-commits] core.git: slideshow/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 28 07:37:24 UTC 2019


 slideshow/source/engine/slide/layermanager.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit cae9240a76cdb0eeed92421930d3b4cbef0ac201
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Aug 28 08:42:39 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Aug 28 09:35:06 2019 +0200

    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 <sbergman at redhat.com>

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.


More information about the Libreoffice-commits mailing list