From 5b89b1dd909f76154266cd51558e97152cff5f64 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 21 Sep 2012 15:07:10 +0200 Subject: o3tl::sorted_vector::insert should take const parameter Change-Id: I139f9d008770da94341b8e6c08c9247478aa186a --- o3tl/inc/o3tl/sorted_vector.hxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'o3tl') diff --git a/o3tl/inc/o3tl/sorted_vector.hxx b/o3tl/inc/o3tl/sorted_vector.hxx index 90aacbf11ac7..d8bceb72e39d 100644 --- a/o3tl/inc/o3tl/sorted_vector.hxx +++ b/o3tl/inc/o3tl/sorted_vector.hxx @@ -134,14 +134,13 @@ public: return (ret.second) ? ret.first : end(); } - void insert( sorted_vector &rOther ) + void insert(sorted_vector const& rOther) { // optimisation for the rather common case that we are overwriting this with the contents // of another sorted vector if ( empty() ) { - base_t::insert( begin_nonconst(), - rOther.begin_nonconst(), rOther.end_nonconst() ); + base_t::insert(begin_nonconst(), rOther.begin(), rOther.end()); } else for( const_iterator it = rOther.begin(); it != rOther.end(); ++it ) -- cgit