MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / query

Method query

Utils/Hashmap.h:170–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168 }
169
170 FORCE_INLINE const ValueType* query(const KeyType &key) const
171 {
172 const unsigned int hashValue = hashFunction<KeyType>(key);
173 const unsigned int mapIndex = hashValue & m_moduloValue;
174 if (m_hashMap[mapIndex] == NULL)
175 {
176 return NULL;
177 }
178 typename KeyValueMap::iterator &it = m_hashMap[mapIndex]->find(hashValue);
179 if (it != m_hashMap[mapIndex]->end())
180 return &it->second;
181 return NULL;
182 }
183
184 FORCE_INLINE ValueType* query(const KeyType &key)
185 {

Callers 2

neighborhoodSearchMethod · 0.80
nk_draw_list_add_textFunction · 0.80

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected