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

Method ptr

source/core/StarLruCache.hpp:95–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93
94template <typename OrderedMapType>
95auto LruCacheBase<OrderedMapType>::ptr(Key const& key) -> Value * {
96 auto i = m_map.find(key);
97 if (i == m_map.end())
98 return nullptr;
99 i = m_map.toBack(i);
100 return &i->second;
101}
102
103template <typename OrderedMapType>
104void LruCacheBase<OrderedMapType>::set(Key const& key, Value value) {

Callers

nothing calls this directly

Calls 3

findMethod · 0.45
endMethod · 0.45
toBackMethod · 0.45

Tested by

no test coverage detected