TextureConfig: Specialize std::hash for TextureConfig

This allows the hashing for TextureConfig instances to automatically be resolved instead of needing to directly specify it all the time.
This commit is contained in:
Lioncash
2017-10-08 20:15:34 -04:00
parent 1a4883ac5a
commit c8af9e5f7b
2 changed files with 21 additions and 13 deletions

View File

@ -212,9 +212,9 @@ private:
int frameCount = FRAMECOUNT_INVALID;
TexPoolEntry(std::unique_ptr<AbstractTexture> tex) : texture(std::move(tex)) {}
};
typedef std::multimap<u32, TCacheEntry*> TexAddrCache;
typedef std::multimap<u64, TCacheEntry*> TexHashCache;
typedef std::unordered_multimap<TextureConfig, TexPoolEntry, TextureConfig::Hasher> TexPool;
using TexAddrCache = std::multimap<u32, TCacheEntry*>;
using TexHashCache = std::multimap<u64, TCacheEntry*>;
using TexPool = std::unordered_multimap<TextureConfig, TexPoolEntry>;
void SetBackupConfig(const VideoConfig& config);