Kaydet (Commit) 5b89b1dd authored tarafından Michael Stahl's avatar Michael Stahl

o3tl::sorted_vector::insert should take const parameter

Change-Id: I139f9d008770da94341b8e6c08c9247478aa186a
üst 5f91f8a3
...@@ -134,14 +134,13 @@ public: ...@@ -134,14 +134,13 @@ public:
return (ret.second) ? ret.first : end(); return (ret.second) ? ret.first : end();
} }
void insert( sorted_vector<Value,Compare,Find> &rOther ) void insert(sorted_vector<Value,Compare,Find> const& rOther)
{ {
// optimisation for the rather common case that we are overwriting this with the contents // optimisation for the rather common case that we are overwriting this with the contents
// of another sorted vector // of another sorted vector
if ( empty() ) if ( empty() )
{ {
base_t::insert( begin_nonconst(), base_t::insert(begin_nonconst(), rOther.begin(), rOther.end());
rOther.begin_nonconst(), rOther.end_nonconst() );
} }
else else
for( const_iterator it = rOther.begin(); it != rOther.end(); ++it ) for( const_iterator it = rOther.begin(); it != rOther.end(); ++it )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment