From ff0160050a7f1a7bd9d338ec6d159fdf714c165c Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 13 Oct 2010 11:42:17 +0000 Subject: SWORD25: Force cast to uint instead of unsigned long long As per Fingolfin's request, because apparently there's no long long in the C++ standard; and ScummVM's hashmap needs uint. svn-id: r53413 --- engines/sword25/kernel/callbackregistry.h | 4 ++-- engines/sword25/kernel/objectregistry.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/sword25') diff --git a/engines/sword25/kernel/callbackregistry.h b/engines/sword25/kernel/callbackregistry.h index 5dde8ba712..ddf5608446 100644 --- a/engines/sword25/kernel/callbackregistry.h +++ b/engines/sword25/kernel/callbackregistry.h @@ -74,8 +74,8 @@ private: } }; struct CallbackPtr_Hash { - unsigned long long operator()(CallbackPtr x) const { - return (unsigned long long)x; + uint operator()(CallbackPtr x) const { + return *(uint *)&x; } }; diff --git a/engines/sword25/kernel/objectregistry.h b/engines/sword25/kernel/objectregistry.h index 2f4cb9d3f7..3a27ba4942 100644 --- a/engines/sword25/kernel/objectregistry.h +++ b/engines/sword25/kernel/objectregistry.h @@ -136,8 +136,8 @@ protected: } }; struct ClassPointer_Hash { - unsigned long long operator()(const T *x) const { - return (unsigned long long)x; + uint operator()(const T *x) const { + return *(uint *)&x; } }; -- cgit v1.2.3