mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Switch to an unordered_map as a micro-optimization.
This commit is contained in:
@ -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.
|
||||
|
||||
|
Reference in New Issue
Block a user