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

Function SetGenericProperty

include/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 2

ReadMultipartFileMethod · 0.85
InternReadFileMethod · 0.85

Calls 2

SuperFastHashFunction · 0.85
endMethod · 0.45

Tested by

no test coverage detected