Fix Drawlist::Clear / Add HashID / FNV Type traits

This commit is contained in:
2026-03-09 20:46:41 +01:00
parent 8ee7006d2c
commit 68cc809555
5 changed files with 70 additions and 1 deletions

View File

@@ -50,4 +50,21 @@ constexpr u64 FNV1A64(std::string_view str) {
}
return ret;
}
namespace Detail {
template <typename T>
struct FNV1A {};
template <>
struct FNV1A<u32> {
static constexpr u32 Hash(std::string_view str) { return FNV1A32(str); }
static constexpr u32 Hash(const std::string& str) { return FNV1A32(str); }
};
template <>
struct FNV1A<u64> {
static constexpr u64 Hash(std::string_view str) { return FNV1A64(str); }
static constexpr u64 Hash(const std::string& str) { return FNV1A64(str); }
};
} // namespace Detail
} // namespace PD