mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
Various Cleanups (framework/)
This commit is contained in:
parent
8951eed780
commit
9753625fd1
23 changed files with 239 additions and 224 deletions
|
|
@ -73,7 +73,7 @@ template<class K>
|
|||
class hash
|
||||
{
|
||||
public:
|
||||
size_t operator() (K const&);
|
||||
size_t operator()(K const&);
|
||||
};
|
||||
|
||||
HASH_NAMESPACE_END
|
||||
|
|
@ -100,27 +100,27 @@ using std::hash_set;
|
|||
|
||||
HASH_NAMESPACE_START
|
||||
|
||||
template<>
|
||||
class hash<unsigned long long>
|
||||
{
|
||||
public:
|
||||
size_t operator()(const unsigned long long &__x) const { return (size_t)__x; }
|
||||
};
|
||||
template<>
|
||||
class hash<unsigned long long>
|
||||
{
|
||||
public:
|
||||
size_t operator()(const unsigned long long& __x) const { return (size_t)__x; }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class hash<T *>
|
||||
{
|
||||
public:
|
||||
size_t operator()(T * const &__x) const { return (size_t)__x; }
|
||||
};
|
||||
template<typename T>
|
||||
class hash<T*>
|
||||
{
|
||||
public:
|
||||
size_t operator()(T* const& __x) const { return (size_t)__x; }
|
||||
};
|
||||
|
||||
template<> struct hash<std::string>
|
||||
template<> struct hash<std::string>
|
||||
{
|
||||
size_t operator()(const std::string& __x) const
|
||||
{
|
||||
size_t operator()(const std::string &__x) const
|
||||
{
|
||||
return hash<const char *>()(__x.c_str());
|
||||
}
|
||||
};
|
||||
return hash<const char*>()(__x.c_str());
|
||||
}
|
||||
};
|
||||
|
||||
HASH_NAMESPACE_END
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue