MCPcopy Create free account
hub / github.com/SmingHub/Sming / find

Method find

Sming/Core/Data/ObjectMap.h:223–227  ·  view source on GitHub ↗

* @brief Find the value for a given key, if it exists * @param key * @retval V* Points to the object if it exists, otherwise nullptr * @note If you need to modify the existing map entry, use `operator[]` or `valueAt()` */

Source from the content-addressed store, hash-verified

221 * @note If you need to modify the existing map entry, use `operator[]` or `valueAt()`
222 */
223 V* find(const K& key) const
224 {
225 int index = entries.indexOf(key);
226 return (index < 0) ? nullptr : entries[index].value.get();
227 }
228
229 /**
230 * @brief Get the index of a key

Callers 1

getValueMethod · 0.45

Calls 2

indexOfMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected