X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=libs%2Fcontainer%2Fhashtable.h;h=6b16bd60b8091092bf650ffabebea3aed1954a1d;hp=0f174d20e87b813d27ac9cd983b161d0ffa54867;hb=d4ba4dcb5644fd978e30a34d2d8b4ad88296f7ad;hpb=c6e14a73cb4846b3db740c2dc8cdfbb37ce9ad47 diff --git a/libs/container/hashtable.h b/libs/container/hashtable.h index 0f174d20..6b16bd60 100644 --- a/libs/container/hashtable.h +++ b/libs/container/hashtable.h @@ -22,13 +22,18 @@ #if !defined( INCLUDED_CONTAINER_HASHTABLE_H ) #define INCLUDED_CONTAINER_HASHTABLE_H +#include + +template > + using HashTable = std::unordered_map; + +#if 0 #include #include #include #include #include "debugging/debugging.h" - namespace HashTableDetail { inline std::size_t next_power_of_two( std::size_t size ){ @@ -240,7 +245,7 @@ BucketNode* bucket_find( Bucket bucket, hash_type hash, const Key& key ){ return 0; } - if ( nodeHash == hash && KeyEqual::operator()( ( *i ).key, key ) ) { + if ( nodeHash == hash && KeyEqual::operator()( ( *i ).first, key ) ) { return i.node(); } } @@ -409,3 +414,5 @@ void clear(){ }; #endif + +#endif