MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / clear

Method clear

source/core/StarFlatHashTable.hpp:333–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331
332template <typename Value, typename Key, typename GetKey, typename Hash, typename Equals, typename Allocator>
333void FlatHashTable<Value, Key, GetKey, Hash, Equals, Allocator>::clear() {
334 if (m_buckets.empty())
335 return;
336
337 for (size_t i = 0; i < m_buckets.size() - 1; ++i)
338 m_buckets[i].setEmpty();
339 m_filledCount = 0;
340}
341
342template <typename Value, typename Key, typename GetKey, typename Hash, typename Equals, typename Allocator>
343auto FlatHashTable<Value, Key, GetKey, Hash, Equals, Allocator>::insert(Value value) -> pair<iterator, bool> {

Callers

nothing calls this directly

Calls 3

setEmptyMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected