MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / SetGenericProperty

Function SetGenericProperty

Source/ThirdParty/assimp/GenericProperty.h:58–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56// ------------------------------------------------------------------------------------------------
57template <class T>
58inline bool SetGenericProperty(std::map<unsigned int, T> &list,
59 const char *szName, const T &value) {
60 ai_assert(nullptr != szName);
61 const uint32_t hash = SuperFastHash(szName);
62
63 typename std::map<unsigned int, T>::iterator it = list.find(hash);
64 if (it == list.end()) {
65 list.insert(std::pair<unsigned int, T>(hash, value));
66 return false;
67 }
68 (*it).second = value;
69
70 return true;
71}
72
73// ------------------------------------------------------------------------------------------------
74template <class T>

Callers

nothing calls this directly

Calls 4

SuperFastHashFunction · 0.85
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected