Include v2i_hash

This commit is contained in:
2025-03-19 15:45:02 -04:00
parent 6b37c03079
commit 27f748ceca

View File

@@ -8,20 +8,11 @@
#include <future>
#include "ConcurrentQueue.hpp"
#include "Entity.hpp"
#include "Core/v2i_hash.hpp"
#pragma once
template<>
struct std::hash<Vector2i>
{
std::size_t operator()(const Vector2i& k) const
{
// Read 2x int32_t into one int64_t and return std::hash<int64_t> to prevent collisions.
// This doesn't really gain any performance until you zoom out a lot.
return std::hash<int64_t>()(((int64_t) k.x << 32) | ((int64_t) k.y));
}
};
namespace CaveGame::Core {
class WorldAsyncIOThreadManager