ProgramShaderCache: Simplify SHADERUID comparison operators

This commit is contained in:
Lioncash 2016-01-01 22:28:42 -05:00
parent 066af14272
commit 6093d1f72a
1 changed files with 6 additions and 17 deletions

View File

@ -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);
}
};