sw/source/core/access/accmap.cxx |   38 ++++++--------------------------------
 1 file changed, 6 insertions(+), 32 deletions(-)

New commits:
commit 425ff2e7911436cf2a20d5640d87274d2467b7c0
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue Feb 8 16:44:02 2022 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Feb 9 07:23:33 2022 +0100

    sw a11y: Drop custom implementations of std::less
    
    SwFrameFunc's operator() just applied the less-than operator
    which is the same as 'std::less<const SwFrame*>' does.
    The latter is the default for the 'Compare' template argument of a
    'std::map' with key type 'const SwFrame*>' anyway, so
    there's no need to specify any explicitly.
    
    The same applies for 'SwShapeFunc' accordingly.
    
    Change-Id: I2472b38d04dd6d280bfb825d750a6d67c2d9797c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129682
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 439749f900bf..7704b16f3e52 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -82,29 +82,16 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::accessibility;
 using namespace ::sw::access;
 
-namespace {
-
-struct SwFrameFunc
-{
-    bool operator()( const SwFrame * p1, const SwFrame * p2) const
-    {
-        return p1 < p2;
-    }
-};
-
-}
-
 class SwAccessibleContextMap_Impl
 {
 public:
     typedef const SwFrame *                                               
key_type;
     typedef uno::WeakReference < XAccessible >                          
mapped_type;
     typedef std::pair<const key_type,mapped_type>                       
value_type;
-    typedef SwFrameFunc                                                   
key_compare;
-    typedef std::map<key_type,mapped_type,key_compare>::iterator        
iterator;
-    typedef std::map<key_type,mapped_type,key_compare>::const_iterator  
const_iterator;
+    typedef std::map<key_type, mapped_type>::iterator iterator;
+    typedef std::map<key_type, mapped_type>::const_iterator const_iterator;
 private:
-    std::map <key_type,mapped_type,key_compare> maMap;
+    std::map <key_type, mapped_type> maMap;
 public:
 
 #if OSL_DEBUG_LEVEL > 0
@@ -257,18 +244,6 @@ void SwDrawModellListener_Impl::Dispose()
     mpDrawModel = nullptr;
 }
 
-namespace {
-
-struct SwShapeFunc
-{
-    bool operator()( const SdrObject * p1, const SdrObject * p2) const
-    {
-        return p1 < p2;
-    }
-};
-
-}
-
 typedef std::pair < const SdrObject *, ::rtl::Reference < 
::accessibility::AccessibleShape > > SwAccessibleObjShape_Impl;
 
 class SwAccessibleShapeMap_Impl
@@ -278,14 +253,13 @@ public:
     typedef const SdrObject *                                           
key_type;
     typedef uno::WeakReference<XAccessible>                             
mapped_type;
     typedef std::pair<const key_type,mapped_type>                       
value_type;
-    typedef SwShapeFunc                                                 
key_compare;
-    typedef std::map<key_type,mapped_type,key_compare>::iterator        
iterator;
-    typedef std::map<key_type,mapped_type,key_compare>::const_iterator  
const_iterator;
+    typedef std::map<key_type, mapped_type>::iterator iterator;
+    typedef std::map<key_type, mapped_type>::const_iterator const_iterator;
 
 private:
 
     ::accessibility::AccessibleShapeTreeInfo    maInfo;
-    std::map<key_type,mapped_type,SwShapeFunc>  maMap;
+    std::map<key_type, mapped_type> maMap;
 
 public:
 

Reply via email to