mirror of
https://github.com/sigonasr2/hamster.git
synced 2025-04-18 06:39:39 -05:00
Make checkpoint hashing faster!
This commit is contained in:
parent
766eba4444
commit
14296e2e63
@ -64,6 +64,6 @@ struct std::hash<Checkpoint>
|
|||||||
{
|
{
|
||||||
std::size_t operator()(const Checkpoint&checkpoint)const
|
std::size_t operator()(const Checkpoint&checkpoint)const
|
||||||
{
|
{
|
||||||
return std::hash<int_fast64_t>()((((int_fast64_t)(*(int_fast32_t*)(&checkpoint.pos.x))<<32)|*(int_fast32_t*)(&checkpoint.pos.y)));
|
return (int_fast64_t)(*(int_fast32_t*)(&checkpoint.pos.x))<<32|*(int_fast32_t*)(&checkpoint.pos.y);
|
||||||
}
|
}
|
||||||
};
|
};
|
Loading…
x
Reference in New Issue
Block a user