From 3bc66c3be17fe1845012b8d5aef7aa22e55ae2c7 Mon Sep 17 00:00:00 2001 From: bels Date: Wed, 11 Jun 2014 20:27:34 -0400 Subject: [PATCH] - Fixes the hash definition in ObjectGuid.h. This looks like it allows mangos to compile on FreeBSD 10 with clang --- src/game/ObjectGuid.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/game/ObjectGuid.h b/src/game/ObjectGuid.h index 00dea1b44..63e4ed9f2 100644 --- a/src/game/ObjectGuid.h +++ b/src/game/ObjectGuid.h @@ -310,8 +310,11 @@ ByteBuffer& operator>> (ByteBuffer& buf, PackedGuidReader const& guid); inline PackedGuid ObjectGuid::WriteAsPacked() const { return PackedGuid(*this); } +#if defined(__FreeBSD__) +namespace std{ +# else HASH_NAMESPACE_START - +#endif template<> class hash { @@ -322,8 +325,12 @@ class hash return hash()(key.GetRawValue()); } }; - +#if defined(__FreeBSD__) +} +# else HASH_NAMESPACE_END +#endif + #define DEFINE_READGUIDMASK(T1, T2) template \ void ByteBuffer::ReadGuidMask(ObjectGuid& guid) \