Skip to content

Commit

Permalink
Linux compile fixes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
sbx320 committed Aug 1, 2016
1 parent 63b4dc7 commit 2b43f1e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Shared/sdk/SharedUtil.HashMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,17 @@ namespace SharedUtil


// Calculate a hash value for SString
template<>
struct std::hash<SString>
namespace std
{
size_t operator()(const SString& str) const
template<>
struct hash<SString>
{
return std::hash<std::string>()(str);
}
};
size_t operator()(const SString& str) const
{
return std::hash<std::string>()(str);
}
};
}

#if defined(WIN32)
inline size_t hash_value ( const SString& strString ) // Required for sparsehash
Expand All @@ -120,7 +123,7 @@ inline size_t hash_value ( const SString& strString ) // Required for sparsehash
return hashFunction ( strString );
}
#elif defined(__GNUC__) && (__GNUC__ >= 3)
namespace std
namespace __gnu_cxx
{
template<>
struct hash < SString >
Expand Down

0 comments on commit 2b43f1e

Please sign in to comment.