summaryrefslogtreecommitdiff
path: root/o3tl
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-03-02 01:23:12 +0100
committerMichael Stahl <mstahl@redhat.com>2013-03-02 01:55:10 +0100
commit9ca5383abfb7f2f785e9f2e2d5b2565b9a60bbab (patch)
tree772e626546f3935cf5cf808d139669072094e022 /o3tl
parentac88fccc33e322ff25f52819e9082f67e3e155ef (diff)
fdo#60886: _SetGetExpFlds: use the custom operator<
The calls to upper_bound in SwDoc::FldsToExpand and SwDoc::FldsToCalc unfortunately compare the pointers and not the values pointed to, which causes all sorts of trouble around non-updated fields. (regression from 2815396a1813cb3956c5aba066de49a7f34bc657) Change-Id: I48817247719671a16821fcb851b17b628c960a66
Diffstat (limited to 'o3tl')
-rw-r--r--o3tl/inc/o3tl/sorted_vector.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/o3tl/inc/o3tl/sorted_vector.hxx b/o3tl/inc/o3tl/sorted_vector.hxx
index 3028f03e1a02..776fd5605e6f 100644
--- a/o3tl/inc/o3tl/sorted_vector.hxx
+++ b/o3tl/inc/o3tl/sorted_vector.hxx
@@ -122,6 +122,11 @@ public:
return std::lower_bound( base_t::begin(), base_t::end(), x, Compare() );
}
+ const_iterator upper_bound( const Value& x ) const
+ {
+ return std::upper_bound( base_t::begin(), base_t::end(), x, Compare() );
+ }
+
/* Searches the container for an element with a value of x
* and returns an iterator to it if found, otherwise it returns an
* iterator to sorted_vector::end (the element past the end of the container).