diff --git a/loader/include/Geode/c++stl/gnustl.hpp b/loader/include/Geode/c++stl/gnustl.hpp index dae16499..67c38309 100644 --- a/loader/include/Geode/c++stl/gnustl.hpp +++ b/loader/include/Geode/c++stl/gnustl.hpp @@ -287,6 +287,8 @@ namespace gd { class GEODE_DLL vector { public: using value_type = T; + using iterator = T*; + using const_iterator = const T*; auto allocator() const { return gd::allocator(); @@ -302,10 +304,10 @@ namespace gd { m_reserveEnd = nullptr; } - size_t nextCapacity(size_t x) { + std::size_t nextCapacity(std::size_t x) { // minimum 16, powers of 2, don't use builtins if (x < 16) return 16; - size_t out = 16; + std::size_t out = 16; while (out < x) { out *= 2; } @@ -410,6 +412,34 @@ namespace gd { } } + iterator erase(iterator pos) + { + return erase(pos, pos + 1); + } + + iterator erase(const_iterator pos) + { + return erase(pos, pos + 1); + } + + iterator erase(iterator first, iterator last) + { + std::move(last, m_finish, first); + + --m_finish; + + return first; + } + + iterator erase(const_iterator first, const_iterator last) + { + std::move(last, m_finish, first); + + --m_finish; + + return first; + } + void push_back(T const& input) { this->grow();