mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Move SMaterial std::hash impl to its header
This commit is contained in:
parent
a799a54894
commit
810f39767c
4 changed files with 35 additions and 56 deletions
|
@ -25,19 +25,10 @@ namespace {
|
|||
// A helper struct
|
||||
struct MeshBufListMaps
|
||||
{
|
||||
struct MaterialHash
|
||||
{
|
||||
size_t operator()(const video::SMaterial &m) const noexcept
|
||||
{
|
||||
// Only hash first texture. Simple and fast.
|
||||
return std::hash<video::ITexture *>{}(m.TextureLayers[0].Texture);
|
||||
}
|
||||
};
|
||||
|
||||
using MeshBufListMap = std::unordered_map<
|
||||
video::SMaterial,
|
||||
std::vector<std::pair<v3s16, scene::IMeshBuffer *>>,
|
||||
MaterialHash>;
|
||||
std::vector<std::pair<v3s16, scene::IMeshBuffer *>>
|
||||
>;
|
||||
|
||||
std::array<MeshBufListMap, MAX_TILE_LAYERS> maps;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue