summaryrefslogtreecommitdiff
path: root/sw/source/core/access/accmap.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-02-08 16:44:02 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2022-02-09 07:23:33 +0100
commit425ff2e7911436cf2a20d5640d87274d2467b7c0 (patch)
tree31233016d3569cdcd390c242f8b9966e990b7123 /sw/source/core/access/accmap.cxx
parent3e5e0c2943e057873952b5394b81dbe6d29ef1e2 (diff)
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.weghorn@posteo.de>
Diffstat (limited to 'sw/source/core/access/accmap.cxx')
-rw-r--r--sw/source/core/access/accmap.cxx38
1 files changed, 6 insertions, 32 deletions
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: