diff -r 6e79c1cb83e6 -r 6bcb284679d4 src/utility.h --- a/src/utility.h Wed May 25 17:48:18 2022 +0300 +++ b/src/utility.h Wed May 25 17:56:30 2022 +0300 @@ -21,12 +21,6 @@ namespace utility { - template - constexpr std::size_t countof(T(&)[N]) - { - return N; - } - // http://stackoverflow.com/a/18204188/3629665 template inline T rotl10(T x) @@ -65,12 +59,6 @@ return string; } - template - bool contains(T&& container, R&& value) - { - return std::find(std::begin(container), std::end(container), value) != std::end(container); - } - /** * @brief Converts the specified vertex to a simple string * @param vertex vertex to convert @@ -86,3 +74,9 @@ return utility::format("(%1, %2, %3)", vertex.x, vertex.y, vertex.z); } } + +template +inline unsigned int qHash(const glm::vec<3, T, Q>& key) +{ + return qHash(key.x) ^ utility::rotl10(qHash(key.y)) ^ utility::rotl20(qHash(key.z)); +}