Include v2i_hash
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user