summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-09-21 16:14:15 -0400
committerGravatar Lioncash2018-09-21 16:17:27 -0400
commit272517cf7ebb08afa7ff524394124f9d061bba52 (patch)
tree339993ebfae08e701a5756059cf61a962324ea06 /src
parentMerge pull request #1370 from Hedges/GDBClean (diff)
downloadyuzu-272517cf7ebb08afa7ff524394124f9d061bba52.tar.gz
yuzu-272517cf7ebb08afa7ff524394124f9d061bba52.tar.xz
yuzu-272517cf7ebb08afa7ff524394124f9d061bba52.zip
shader_bytecode: Make operator== and operator!= of IpaMode const qualified
These don't affect the state of the struct and can be const member functions.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/engines/shader_bytecode.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index 7e1de0fa1..acd6f5b21 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -5,9 +5,8 @@
5#pragma once 5#pragma once
6 6
7#include <bitset> 7#include <bitset>
8#include <cstring>
9#include <map>
10#include <string> 8#include <string>
9#include <tuple>
11#include <vector> 10#include <vector>
12 11
13#include <boost/optional.hpp> 12#include <boost/optional.hpp>
@@ -321,11 +320,13 @@ enum class IpaSampleMode : u64 { Default = 0, Centroid = 1, Offset = 2 };
321struct IpaMode { 320struct IpaMode {
322 IpaInterpMode interpolation_mode; 321 IpaInterpMode interpolation_mode;
323 IpaSampleMode sampling_mode; 322 IpaSampleMode sampling_mode;
324 inline bool operator==(const IpaMode& a) { 323
325 return (a.interpolation_mode == interpolation_mode) && (a.sampling_mode == sampling_mode); 324 bool operator==(const IpaMode& a) const {
325 return std::tie(interpolation_mode, sampling_mode) ==
326 std::tie(a.interpolation_mode, a.sampling_mode);
326 } 327 }
327 inline bool operator!=(const IpaMode& a) { 328 bool operator!=(const IpaMode& a) const {
328 return !((*this) == a); 329 return !operator==(a);
329 } 330 }
330}; 331};
331 332