Hash functor for CacheKey.
More...
#include <mxvk/include/mxvk/mxvk_text.hpp>
Hash functor for CacheKey.
Definition at line 92 of file mxvk_text.hpp.
◆ operator()()
| size_t mxvk::CacheKeyHash::operator() |
( |
const CacheKey & | k | ) |
const |
|
inline |
Definition at line 93 of file mxvk_text.hpp.
93 {
94 size_t h = std::hash<std::string>{}(k.text);
95 h ^= std::hash<TTF_Font *>{}(k.font) + 0x9e3779b9 + (h << 6) + (h >> 2);
96 h ^= std::hash<uint8_t>{}(k.r) + 0x9e3779b9 + (h << 6) + (h >> 2);
97 h ^= std::hash<uint8_t>{}(k.g) + 0x9e3779b9 + (h << 6) + (h >> 2);
98 h ^= std::hash<uint8_t>{}(k.b) + 0x9e3779b9 + (h << 6) + (h >> 2);
99 h ^= std::hash<uint8_t>{}(k.a) + 0x9e3779b9 + (h << 6) + (h >> 2);
100 return h;
101 }
The documentation for this struct was generated from the following file: