Revert 6f68e52 and fix the gcc2 build via template.

* Instead of forcing the hash-table to use a copy of the key,
  introduce and use TypeOperation template to avoid taking a
  reference of a reference type (which gcc2 doesn't allow).
This commit is contained in:
Oliver Tappe
2014-04-20 00:26:29 +02:00
parent 8116f47f3e
commit 94089b909d
5 changed files with 84 additions and 3 deletions
+5 -2
View File
@@ -13,6 +13,9 @@
#ifdef _KERNEL_MODE
# include <KernelExport.h>
# include <util/kernel_cpp.h>
# include <util/TypeOperation.h>
#else
# include <TypeOperation.h>
#endif
@@ -136,7 +139,7 @@ public:
return fItemCount;
}
ValueType* Lookup(const KeyType& key) const
ValueType* Lookup(typename TypeOperation<KeyType>::ConstRefT key) const
{
if (fTableSize == 0)
return NULL;
@@ -364,7 +367,7 @@ public:
return Iterator(this);
}
Iterator GetIterator(const KeyType& key) const
Iterator GetIterator(typename TypeOperation<KeyType>::ConstRefT key) const
{
if (fTableSize == 0)
return Iterator(this, fTableSize, NULL);
@@ -0,0 +1 @@
#include <../shared/TypeOperation.h>