Use std::vector to implement HashTable

Allows some code semplification and avoids directly
allocation and managing heap memory.

Also the usual renaming while there.

No functional change and no speed regression.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2012-03-31 12:15:57 +01:00
parent 304deb5e83
commit 32c504076f
9 changed files with 83 additions and 110 deletions

View File

@@ -112,7 +112,7 @@ public:
Endgames();
~Endgames();
template<typename T> EndgameBase<T>* get(Key key) {
template<typename T> EndgameBase<T>* probe(Key key) {
return map((T*)0).count(key) ? map((T*)0)[key] : NULL;
}
};