| 56 | // ------------------------------------------------------------------------------------------------ |
| 57 | template <class T> |
| 58 | inline 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 | // ------------------------------------------------------------------------------------------------ |
| 74 | template <class T> |
no test coverage detected