diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/common_funcs.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index 7a8dd39a0..ed20c3629 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h | |||
| @@ -4,9 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <cstddef> | ||
| 8 | #include <functional> | ||
| 9 | |||
| 10 | #include "common_types.h" | 7 | #include "common_types.h" |
| 11 | 8 | ||
| 12 | #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) | 9 | #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) |
| @@ -98,18 +95,3 @@ inline u64 _rotr64(u64 x, unsigned int shift){ | |||
| 98 | // This function might change the error code. | 95 | // This function might change the error code. |
| 99 | // Defined in Misc.cpp. | 96 | // Defined in Misc.cpp. |
| 100 | const char* GetLastErrorMsg(); | 97 | const char* GetLastErrorMsg(); |
| 101 | |||
| 102 | template <typename T> | ||
| 103 | inline std::size_t hash(const T& o) { | ||
| 104 | return std::hash<T>()(o); | ||
| 105 | } | ||
| 106 | |||
| 107 | template <typename T> | ||
| 108 | inline std::size_t combine_hash(const T& o) { | ||
| 109 | return hash(o); | ||
| 110 | } | ||
| 111 | |||
| 112 | template <typename T, typename... Args> | ||
| 113 | inline std::size_t combine_hash(const T& o, const Args&... args) { | ||
| 114 | return hash(o) * 3 + combine_hash(args...); | ||
| 115 | } | ||