From 824614e704612e46bf8a986c30a8d2546e9e4aae Mon Sep 17 00:00:00 2001 From: altalk23 <45172705+altalk23@users.noreply.github.com> Date: Sun, 27 Aug 2023 19:40:49 +0300 Subject: [PATCH] add macos map operator[] --- loader/include/Geode/c++stl/gnustl.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/loader/include/Geode/c++stl/gnustl.hpp b/loader/include/Geode/c++stl/gnustl.hpp index 8508d339..84217820 100644 --- a/loader/include/Geode/c++stl/gnustl.hpp +++ b/loader/include/Geode/c++stl/gnustl.hpp @@ -185,6 +185,14 @@ namespace gd { --m_nodecount; } + V& operator[](K const& __k) { + iterator __i = lower_bound(__k); + if (__i == end() || compare(__k, (*__i).first)) { + __i = insert(__i, std::pair(__k, V())); + } + return (*__i).second; + } + iterator begin() noexcept { return iterator(m_header.m_left); }