MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ erase() [1/2]

template<typename K, typename V, typename Compare = std::less<K>>
bool MayaFlux::Memory::FlatMap< K, V, Compare >::erase ( const K & key)
inline

Removes the entry for key.

Returns
true if there was one.

Definition at line 72 of file FlatMap.hpp.

73 {
74 const size_t index = lower_index(key);
75 if (index >= m_items.size() || m_less(key, m_items[index].first)) {
76 return false;
77 }
78 m_items.erase(m_items.begin() + static_cast<std::ptrdiff_t>(index));
79 return true;
80 }
size_t lower_index(const Q &key) const
Definition FlatMap.hpp:129
std::vector< value_type > m_items
Definition FlatMap.hpp:135
Map kept as one sorted vector, cheap to copy.
Definition FlatMap.hpp:21

Referenced by MayaFlux::Core::NetworkSubsystem::cancel_post(), MayaFlux::Core::VKCommandManager::free_command_buffer(), MayaFlux::Core::NetworkSubsystem::post_after(), and MayaFlux::Core::BackendResourceManager::release_buffer_handles().

Here is the caller graph for this function: