Remove the given element and return true, if the element was found. */
| 131 | /** Remove the given element and return true, if the element was found. |
| 132 | */ |
| 133 | FORCE_INLINE void remove(const KeyType &key) |
| 134 | { |
| 135 | const unsigned int hashValue = hashFunction<KeyType>(key); |
| 136 | const unsigned int mapIndex = hashValue & m_moduloValue; |
| 137 | if (m_hashMap[mapIndex] != NULL) |
| 138 | { |
| 139 | m_hashMap[mapIndex]->erase(hashValue); |
| 140 | if (m_hashMap[mapIndex]->size() == 0) |
| 141 | { |
| 142 | delete m_hashMap[mapIndex]; |
| 143 | m_hashMap[mapIndex] = NULL; |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | FORCE_INLINE ValueType& operator[](const KeyType &key) |
| 149 | { |