aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorBastien Bouclet2017-09-24 19:09:40 +0200
committerBastien Bouclet2017-09-30 21:35:16 +0200
commitfd19e2fc15405935ff6e3ef56edc3aab92323529 (patch)
treedc5c07cda4e538954404481fbd624cc381212ece /engines/fullpipe
parent55f46d36671b1ceb23b06a7ce00627379352f9ca (diff)
downloadscummvm-rg350-fd19e2fc15405935ff6e3ef56edc3aab92323529.tar.gz
scummvm-rg350-fd19e2fc15405935ff6e3ef56edc3aab92323529.tar.bz2
scummvm-rg350-fd19e2fc15405935ff6e3ef56edc3aab92323529.zip
COMMON: Introduce a shared hash function for pointer types
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/utils.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h
index e53db3d26a..d19def663a 100644
--- a/engines/fullpipe/utils.h
+++ b/engines/fullpipe/utils.h
@@ -23,6 +23,7 @@
#ifndef FULLPIPE_UTILS_H
#define FULLPIPE_UTILS_H
+#include "common/hash-ptr.h"
#include "common/hash-str.h"
#include "common/array.h"
#include "common/file.h"
@@ -32,18 +33,7 @@ namespace Fullpipe {
class CObject;
class NGIArchive;
-struct Pointer_EqualTo {
- bool operator()(const void *x, const void *y) const { return x == y; }
-};
-
-struct Pointer_Hash {
- uint operator()(const void *x) const {
- uint x = static_cast<uint>(reinterpret_cast<uintptr>(v));
- return x + (x >> 3);
- }
-};
-
-typedef Common::HashMap<void *, int, Pointer_Hash, Pointer_EqualTo> ObjHash;
+typedef Common::HashMap<void *, int> ObjHash;
typedef Common::HashMap<Common::String, int, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> ClassMap;