mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
We can now use std::exchange() as we switched to C++17
This commit is contained in:
parent
71ff0f9cae
commit
2bf472988b
2 changed files with 4 additions and 12 deletions
|
@ -217,14 +217,6 @@ inline typename CONTAINER_TYPE::value_type& next_value_modulo(typename CONTAINER
|
|||
return container[next_idx_modulo(idx, container.size())];
|
||||
}
|
||||
|
||||
template<class T, class U = T>
|
||||
inline T exchange(T& obj, U&& new_value)
|
||||
{
|
||||
T old_value = std::move(obj);
|
||||
obj = std::forward<U>(new_value);
|
||||
return old_value;
|
||||
}
|
||||
|
||||
extern std::string xml_escape(std::string text);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue