fixed: gcc8 compile issues
[opensg.git] / Source / External / google / sparsehash / hash_fun.h
blob70e45d80924b5f474ba07a1c651f88822a499846
2 #ifndef _HASH_FUN_H_
3 #define _HASH_FUN_H_
5 #ifndef HASH_NAMESPACE
6 #define HASH_NAMESPACE osg_hash
7 #endif
9 namespace osg_hash
11 template <class KeyT>
12 struct hash {};
15 #ifndef WIN32
17 template <>
18 struct hash<OSG::Int16>
20 size_t operator()(OSG::Int16 __x) const
22 return static_cast<size_t>(__x);
26 template <>
27 struct hash<OSG::UInt16>
29 size_t operator()(OSG::UInt16 __x) const
31 return static_cast<size_t>(__x);
35 #else
37 template <>
38 struct hash<SHORT>
40 size_t operator()(SHORT __x) const
42 return static_cast<size_t>(__x);
47 template <>
48 struct hash<USHORT>
50 size_t operator()(USHORT __x) const
52 return static_cast<size_t>(__x);
56 #endif // WIN32
60 #endif // _HASH_FUN_H_