p2p/stingray_sdk/plugin_foundation/collection_tools.inl
Lucas Schwiderski 2c9ce46dd2
chore: Rework project structure
There likely won't be much need for multiple separate crates.
2023-05-26 23:42:01 +02:00

16 lines
293 B
C++

namespace stingray_plugin_foundation {
template <class T>
inline void swap_erase(T &v, typename T::iterator it)
{
std::swap(*it, v.back());
v.pop_back();
}
template <class T>
inline void swap_erase(T &v, int i)
{
swap_erase(v, v.begin() + i);
}
} // namespace stingray_plugin_foundation