mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
Switch to an unordered_map as a micro-optimization.
This commit is contained in:
parent
f8452ff501
commit
90638c6806
3 changed files with 18 additions and 4 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Hash.h"
|
||||
|
||||
// m_components
|
||||
enum
|
||||
|
@ -87,6 +87,20 @@ struct PortableVertexDeclaration
|
|||
}
|
||||
};
|
||||
|
||||
namespace std
|
||||
{
|
||||
|
||||
template <>
|
||||
struct hash<PortableVertexDeclaration>
|
||||
{
|
||||
size_t operator()(const PortableVertexDeclaration& decl) const
|
||||
{
|
||||
return HashFletcher((u8 *) &decl, sizeof(decl));
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
// The implementation of this class is specific for GL/DX, so NativeVertexFormat.cpp
|
||||
// is in the respective backend, not here in VideoCommon.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue