[Scummvm-cvs-logs] SF.net SVN: scummvm:[53221] scummvm/trunk/engines/sword25/kernel
sev at users.sourceforge.net
sev at users.sourceforge.net
Wed Oct 13 00:31:38 CEST 2010
Revision: 53221
http://scummvm.svn.sourceforge.net/scummvm/?rev=53221&view=rev
Author: sev
Date: 2010-10-12 22:31:38 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
SWORD25: Fix callbackregistry.h compilation
Modified Paths:
--------------
scummvm/trunk/engines/sword25/kernel/callbackregistry.cpp
scummvm/trunk/engines/sword25/kernel/callbackregistry.h
Modified: scummvm/trunk/engines/sword25/kernel/callbackregistry.cpp
===================================================================
--- scummvm/trunk/engines/sword25/kernel/callbackregistry.cpp 2010-10-12 22:31:18 UTC (rev 53220)
+++ scummvm/trunk/engines/sword25/kernel/callbackregistry.cpp 2010-10-12 22:31:38 UTC (rev 53221)
@@ -117,7 +117,7 @@
Common::String BS_CallbackRegistry::FindNameByPtr(CallbackPtr Ptr) const {
// Eintrag in der Map finden und den Namen zur\xFCckgeben.
PtrToNameMap::const_iterator It = m_PtrToNameMap.find(Ptr);
- return It == m_PtrToNameMap.end() ? "" : It->second;
+ return It == m_PtrToNameMap.end() ? "" : It->_value;
}
// -----------------------------------------------------------------------------
Modified: scummvm/trunk/engines/sword25/kernel/callbackregistry.h
===================================================================
--- scummvm/trunk/engines/sword25/kernel/callbackregistry.h 2010-10-12 22:31:18 UTC (rev 53220)
+++ scummvm/trunk/engines/sword25/kernel/callbackregistry.h 2010-10-12 22:31:38 UTC (rev 53221)
@@ -43,6 +43,7 @@
#include "common/str.h"
#include "common/hash-str.h"
#include "common/hashmap.h"
+#include "sword25/kernel/bs_stdint.h"
#include "sword25/kernel/common.h"
namespace Sword25 {
@@ -67,7 +68,17 @@
private:
typedef Common::HashMap<Common::String, CallbackPtr, Common::CaseSensitiveString_Hash, Common::CaseSensitiveString_EqualTo> NameToPtrMap;
NameToPtrMap m_NameToPtrMap;
- typedef Common::HashMap<CallbackPtr, Common::String, Common::CaseSensitiveString_Hash, Common::CaseSensitiveString_EqualTo> PtrToNameMap;
+
+ struct CallbackPtr_EqualTo {
+ bool operator()(CallbackPtr x, CallbackPtr y) const { return x == y; }
+ };
+ struct CallbackPtr_Hash {
+ uint operator()(CallbackPtr x) const {
+ return static_cast<uint>((int64)x % ((int64)1 << sizeof(uint)));
+ }
+ };
+
+ typedef Common::HashMap<CallbackPtr, Common::String, CallbackPtr_Hash, CallbackPtr_EqualTo> PtrToNameMap;
PtrToNameMap m_PtrToNameMap;
CallbackPtr FindPtrByName(const Common::String &Name) const;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list