summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2016-01-01 22:28:42 -0500
committerLioncash <mathew1800@gmail.com>2016-01-01 22:28:42 -0500
commit6093d1f72aad6473fdb41434b6b49f22542fcf0f (patch)
treed9fb71ae00a221a05c0e91daac6f6d89c1c4ec0b /Source/Core/VideoBackends/OGL/ProgramShaderCache.h
parent066af14272a87870bbb84280249cf938d9eba336 (diff)
ProgramShaderCache: Simplify SHADERUID comparison operators
Diffstat (limited to 'Source/Core/VideoBackends/OGL/ProgramShaderCache.h')
-rw-r--r--Source/Core/VideoBackends/OGL/ProgramShaderCache.h23
1 files changed, 6 insertions, 17 deletions
diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
index d20da70d2f..1a759b6b9d 100644
--- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
+++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h
@@ -4,6 +4,8 @@
#pragma once
+#include <tuple>
+
#include "Common/LinearDiskCache.h"
#include "Common/GL/GLUtil.h"
@@ -29,27 +31,14 @@ public:
bool operator <(const SHADERUID& r) const
{
- if (puid < r.puid)
- return true;
-
- if (r.puid < puid)
- return false;
-
- if (vuid < r.vuid)
- return true;
-
- if (r.vuid < vuid)
- return false;
-
- if (guid < r.guid)
- return true;
-
- return false;
+ return std::tie(puid, vuid, guid) <
+ std::tie(r.puid, r.vuid, r.guid);
}
bool operator ==(const SHADERUID& r) const
{
- return puid == r.puid && vuid == r.vuid && guid == r.guid;
+ return std::tie(puid, vuid, guid) ==
+ std::tie(r.puid, r.vuid, r.guid);
}
};