diff options
| author | 2019-05-19 02:42:57 -0400 | |
|---|---|---|
| committer | 2019-05-19 02:46:45 -0400 | |
| commit | 7fdc644c446b3c710d3e3160ced89dd793485eca (patch) | |
| tree | 7dc890f6bb2a472cce1bd1c42f8f70143b382468 /src | |
| parent | gl_shader_disk_cache: Remove redundant code string construction in LoadDecomp... (diff) | |
| download | yuzu-7fdc644c446b3c710d3e3160ced89dd793485eca.tar.gz yuzu-7fdc644c446b3c710d3e3160ced89dd793485eca.tar.xz yuzu-7fdc644c446b3c710d3e3160ced89dd793485eca.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.h b/src/video_core/renderer_opengl/gl_shader_disk_cache.h index 34d4bd637..7a7183f21 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.h +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.h | |||
| @@ -70,14 +70,14 @@ namespace std { | |||
| 70 | 70 | ||
| 71 | template <> | 71 | template <> |
| 72 | struct hash<OpenGL::BaseBindings> { | 72 | struct hash<OpenGL::BaseBindings> { |
| 73 | std::size_t operator()(const OpenGL::BaseBindings& bindings) const { | 73 | std::size_t operator()(const OpenGL::BaseBindings& bindings) const noexcept { |
| 74 | return bindings.cbuf | bindings.gmem << 8 | bindings.sampler << 16; | 74 | return bindings.cbuf | bindings.gmem << 8 | bindings.sampler << 16; |
| 75 | } | 75 | } |
| 76 | }; | 76 | }; |
| 77 | 77 | ||
| 78 | template <> | 78 | template <> |
| 79 | struct hash<OpenGL::ShaderDiskCacheUsage> { | 79 | struct hash<OpenGL::ShaderDiskCacheUsage> { |
| 80 | std::size_t operator()(const OpenGL::ShaderDiskCacheUsage& usage) const { | 80 | std::size_t operator()(const OpenGL::ShaderDiskCacheUsage& usage) const noexcept { |
| 81 | return static_cast<std::size_t>(usage.unique_identifier) ^ | 81 | return static_cast<std::size_t>(usage.unique_identifier) ^ |
| 82 | std::hash<OpenGL::BaseBindings>()(usage.bindings) ^ usage.primitive << 16; | 82 | std::hash<OpenGL::BaseBindings>()(usage.bindings) ^ usage.primitive << 16; |
| 83 | } | 83 | } |