From 70c3ade4dd87907506ab40eb8e1cf04e4db3779a Mon Sep 17 00:00:00 2001 From: UIS Date: Sun, 20 Sep 2020 00:59:00 +0300 Subject: Shader optimization, removed unused argument from GetBlockInfo function --- src/Block.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Block.cpp') diff --git a/src/Block.cpp b/src/Block.cpp index b81a762..85870f6 100644 --- a/src/Block.cpp +++ b/src/Block.cpp @@ -11,12 +11,12 @@ static std::map staticBlockInfo; BlockInfo WTFBlock{ true, "", "" }; void RegisterStaticBlockInfo(BlockId blockId, BlockInfo blockInfo) { - //NOTE: It can be made thread-safe using incrementer + //NOTE: It can be made thread-safe by using atomic incrementer staticBlockInfo[blockId] = blocks.size(); blocks.push_back(blockInfo); } -BlockInfo* GetBlockInfo(BlockId blockId, Vector blockPos) { +BlockInfo* GetBlockInfo(BlockId blockId) { auto it = staticBlockInfo.find(blockId); if (it != staticBlockInfo.end()) return &blocks.data()[it->second]; -- cgit v1.2.3