From 5d2b77899f83160ec969aeab6b266a6c63d27f11 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 28 Nov 2010 21:33:02 +0000 Subject: SWORD25: Fix warning: deref type-punned pointer breaks strict-aliasing rules svn-id: r54550 --- engines/sword25/kernel/objectregistry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/sword25/kernel/objectregistry.h b/engines/sword25/kernel/objectregistry.h index 3a27ba4942..97fe19c93d 100644 --- a/engines/sword25/kernel/objectregistry.h +++ b/engines/sword25/kernel/objectregistry.h @@ -137,7 +137,7 @@ protected: }; struct ClassPointer_Hash { uint operator()(const T *x) const { - return *(uint *)&x; + return (uint)(x - (const T *)0); } }; -- cgit v1.2.3