Vojta wants back compatibility
This commit is contained in:
parent
ee50af26c3
commit
a4b0a9d0f3
1 changed files with 8 additions and 0 deletions
|
@ -108,6 +108,10 @@ inline void append(std::vector<T>& dest, std::vector<T>&& src)
|
|||
dest.insert(dest.end(),
|
||||
std::make_move_iterator(src.begin()),
|
||||
std::make_move_iterator(src.end()));
|
||||
|
||||
// Vojta wants back compatibility
|
||||
src.clear();
|
||||
src.shrink_to_fit();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -132,6 +136,10 @@ inline void append_reversed(std::vector<T>& dest, std::vector<T>&& src)
|
|||
dest.insert(dest.end(),
|
||||
std::make_move_iterator(src.rbegin()),
|
||||
std::make_move_iterator(src.rend()));
|
||||
|
||||
// Vojta wants back compatibility
|
||||
src.clear();
|
||||
src.shrink_to_fit();
|
||||
}
|
||||
|
||||
// Casting an std::vector<> from one type to another type without warnings about a loss of accuracy.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue