Bug 2657248: take two, this time fix it properly!
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@993 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
fc81b2a539
commit
da63cc999c
1 changed files with 16 additions and 17 deletions
|
@ -807,13 +807,11 @@ private:
|
|||
|
||||
const typename std::iterator_traits<FwdIterator>::difference_type n2 =
|
||||
std::distance(s1, s2);
|
||||
assert(n2 >= 0);
|
||||
|
||||
// Empty replacement.
|
||||
if(0 == n2)
|
||||
return;
|
||||
|
||||
assert(n2 > 0);
|
||||
|
||||
// Make sure the replacement isn't empty.
|
||||
if(0 != n2)
|
||||
{
|
||||
// Handle aliased replace
|
||||
static const std::less_equal<const value_type*> le =
|
||||
std::less_equal<const value_type*>();
|
||||
|
@ -827,6 +825,7 @@ private:
|
|||
swap(temp);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (n1 > n2)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue