diff --git a/o3tl/inc/o3tl/sorted_vector.hxx b/o3tl/inc/o3tl/sorted_vector.hxx index 4d442dd590ae..6f444d90be14 100644 --- a/o3tl/inc/o3tl/sorted_vector.hxx +++ b/o3tl/inc/o3tl/sorted_vector.hxx @@ -27,12 +27,13 @@ struct find_unique; @tpl Compare comparison method @tpl Find look up index of a Value in the array */ -template, - class Find = find_unique > +template, + template class Find = find_unique > class sorted_vector : private std::vector { private: + typedef Find Find_t; typedef typename std::vector base_t; typedef typename std::vector::iterator iterator; public: @@ -47,7 +48,7 @@ public: std::pair insert( const Value& x ) { - std::pair const ret(Find()(begin(), end(), x)); + std::pair const ret(Find_t()(begin(), end(), x)); if (!ret.second) { const_iterator const it = base_t::insert( @@ -59,7 +60,7 @@ public: size_type erase( const Value& x ) { - std::pair const ret(Find()(begin(), end(), x)); + std::pair const ret(Find_t()(begin(), end(), x)); if (ret.second) { base_t::erase(begin_nonconst() + (ret.first - begin())); @@ -129,7 +130,7 @@ public: */ const_iterator find( const Value& x ) const { - std::pair const ret(Find()(begin(), end(), x)); + std::pair const ret(Find_t()(begin(), end(), x)); return (ret.second) ? ret.first : end(); } diff --git a/o3tl/qa/test-sorted_vector.cxx b/o3tl/qa/test-sorted_vector.cxx index 1b321c91a2a4..8e9e719f2c1d 100644 --- a/o3tl/qa/test-sorted_vector.cxx +++ b/o3tl/qa/test-sorted_vector.cxx @@ -136,8 +136,7 @@ public: void testBasics_FindPtr() { o3tl::sorted_vector, - o3tl::find_partialorder_ptrequals > > aVec; + o3tl::find_partialorder_ptrequals> aVec; SwContent *p1 = new SwContent(1); SwContent *p2 = new SwContent(2); SwContent *p2_2 = new SwContent(2); @@ -195,8 +194,7 @@ public: void testErase_FindPtr() { o3tl::sorted_vector, - o3tl::find_partialorder_ptrequals > > aVec; + o3tl::find_partialorder_ptrequals> aVec; SwContent *p1 = new SwContent(1); SwContent *p1_2 = new SwContent(1); SwContent *p1_3 = new SwContent(1); diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index 7c9f92884694..4f9b9af9d2ce 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -145,7 +145,7 @@ struct CompareSwRedlineTbl }; class _SwRedlineTbl : public o3tl::sorted_vector > + o3tl::find_partialorder_ptrequals> { public: ~_SwRedlineTbl(); diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx index 154c95763740..773bb1f4bfaa 100644 --- a/sw/inc/ndhints.hxx +++ b/sw/inc/ndhints.hxx @@ -76,14 +76,14 @@ struct CompareSwpHtStart bool operator()(SwTxtAttr* const lhs, SwTxtAttr* const rhs) const; }; class SwpHtStart : public o3tl::sorted_vector > {}; + o3tl::find_partialorder_ptrequals> {}; struct CompareSwpHtEnd { bool operator()(SwTxtAttr* const lhs, SwTxtAttr* const rhs) const; }; class SwpHtEnd : public o3tl::sorted_vector > {}; + o3tl::find_partialorder_ptrequals> {}; // Class SwpHintsArr diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx index 19b14e09153a..8184d5cd140b 100644 --- a/sw/source/filter/html/htmlfly.hxx +++ b/sw/source/filter/html/htmlfly.hxx @@ -130,8 +130,7 @@ public: class SwHTMLPosFlyFrms : public o3tl::sorted_vector, - o3tl::find_partialorder_ptrequals > > + o3tl::find_partialorder_ptrequals> {}; #endif diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index f150239206db..9330f46519ba 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -106,8 +106,7 @@ using namespace ::com::sun::star::container; class SwContentArr : public o3tl::sorted_vector, - o3tl::find_partialorder_ptrequals > > + o3tl::find_partialorder_ptrequals> { public: ~SwContentArr() { DeleteAndDestroyAll(); }