mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 17:25:46 +00:00
gl_shader_disk_cache: Make hash specializations noexcept
The standard library expects hash specializations that don't throw exceptions. Make this explicit in the type to allow selection of better code paths if possible in implementations.
This commit is contained in:
parent
55feec3b8c
commit
3e7c4827ec
1 changed files with 2 additions and 2 deletions
|
@ -70,14 +70,14 @@ namespace std {
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct hash<OpenGL::BaseBindings> {
|
struct hash<OpenGL::BaseBindings> {
|
||||||
std::size_t operator()(const OpenGL::BaseBindings& bindings) const {
|
std::size_t operator()(const OpenGL::BaseBindings& bindings) const noexcept {
|
||||||
return bindings.cbuf | bindings.gmem << 8 | bindings.sampler << 16;
|
return bindings.cbuf | bindings.gmem << 8 | bindings.sampler << 16;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct hash<OpenGL::ShaderDiskCacheUsage> {
|
struct hash<OpenGL::ShaderDiskCacheUsage> {
|
||||||
std::size_t operator()(const OpenGL::ShaderDiskCacheUsage& usage) const {
|
std::size_t operator()(const OpenGL::ShaderDiskCacheUsage& usage) const noexcept {
|
||||||
return static_cast<std::size_t>(usage.unique_identifier) ^
|
return static_cast<std::size_t>(usage.unique_identifier) ^
|
||||||
std::hash<OpenGL::BaseBindings>()(usage.bindings) ^ usage.primitive << 16;
|
std::hash<OpenGL::BaseBindings>()(usage.bindings) ^ usage.primitive << 16;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue