dsmap: Fix incorrect hash invocation

This commit is contained in:
doyle 2023-03-28 22:52:06 +11:00
parent 9e3dc694d8
commit 5e4c268b1a
1 changed files with 2 additions and 3 deletions

5
dqn.h
View File

@ -3626,11 +3626,10 @@ DQN_API Dqn_DSMapKey Dqn_DSMap_KeyU64(Dqn_DSMap<T> const *map, uint64_t u64)
Dqn_DSMapKey result = {};
result.type = Dqn_DSMapKeyType_U64;
result.payload.u64 = u64;
result.hash = Dqn_DSMap_Hash(map, &result);
result.hash = Dqn_DSMap_Hash(map, result);
return result;
}
template <typename T>
DQN_API Dqn_DSMapKey Dqn_DSMap_KeyString8(Dqn_DSMap<T> const *map, Dqn_String8 string)
{
@ -3639,7 +3638,7 @@ DQN_API Dqn_DSMapKey Dqn_DSMap_KeyString8(Dqn_DSMap<T> const *map, Dqn_String8 s
result.type = Dqn_DSMapKeyType_Buffer;
result.payload.buffer.data = string.data;
result.payload.buffer.size = DQN_CAST(uint32_t)string.size;
result.hash = Dqn_DSMap_Hash(map, &result);
result.hash = Dqn_DSMap_Hash(map, result);
return result;
}