mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-23 16:07:52 -05:00
add macos map operator[]
This commit is contained in:
parent
d6ef0a9650
commit
824614e704
1 changed files with 8 additions and 0 deletions
|
@ -185,6 +185,14 @@ namespace gd {
|
||||||
--m_nodecount;
|
--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>(__k, V()));
|
||||||
|
}
|
||||||
|
return (*__i).second;
|
||||||
|
}
|
||||||
|
|
||||||
iterator begin() noexcept {
|
iterator begin() noexcept {
|
||||||
return iterator(m_header.m_left);
|
return iterator(m_header.m_left);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue