diff options
Diffstat (limited to 'games/xmoto/files/patch-src-include-xm__hashmap.h')
-rw-r--r-- | games/xmoto/files/patch-src-include-xm__hashmap.h | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/games/xmoto/files/patch-src-include-xm__hashmap.h b/games/xmoto/files/patch-src-include-xm__hashmap.h index 479833f698dc..96d68172a9ae 100644 --- a/games/xmoto/files/patch-src-include-xm__hashmap.h +++ b/games/xmoto/files/patch-src-include-xm__hashmap.h @@ -1,11 +1,28 @@ ---- src/include/xm_hashmap.h.orig 2011-10-12 00:18:17.000000000 +0400 -+++ src/include/xm_hashmap.h 2013-09-13 22:30:46.334969348 +0400 -@@ -14,7 +14,7 @@ +--- src/include/xm_hashmap.h.orig 2015-01-12 23:04:54.000000000 +0100 ++++ src/include/xm_hashmap.h 2015-01-12 23:07:53.000000000 +0100 +@@ -13,13 +13,18 @@ + #include <hash_map> namespace HashNamespace=std; #endif - struct hashcmp_str { +-struct hashcmp_str { - bool operator()(const char* s1, const char* s2) { -+ bool operator()(const char* s1, const char* s2) const { - if(s1 == NULL || s2 == NULL) { - return false; +- if(s1 == NULL || s2 == NULL) { +- return false; ++ ++#ifdef _LIBCPP_VERSION ++namespace __gnu_cxx { ++ template<> struct hash<std::string> ++ : public unary_function<std::string, size_t> ++ { ++ size_t operator()(const std::string& s) const ++ { ++ return hash<const char*>()(s.c_str()); } +- return strcmp(s1, s2) == 0; +- } +-}; ++ }; ++} ++#endif // _LIBCPP_VERSION + + #endif |