mirror of
https://github.com/minetest/minetest.git
synced 2025-09-18 03:15:20 +02:00
Move SMaterial std::hash impl to its header
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user