summaryrefslogtreecommitdiffstats
path: root/src/Simulator
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-06-07 12:52:14 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-06-07 13:53:59 +0200
commitf44d123ba8ca14c3df90afff85a0674a4463cfa2 (patch)
treed017fd5b9dd4f98b7b52b8262d1bf21f568fca10 /src/Simulator
parentUse emplace to construct structures (diff)
downloadcuberite-f44d123ba8ca14c3df90afff85a0674a4463cfa2.tar
cuberite-f44d123ba8ca14c3df90afff85a0674a4463cfa2.tar.gz
cuberite-f44d123ba8ca14c3df90afff85a0674a4463cfa2.tar.bz2
cuberite-f44d123ba8ca14c3df90afff85a0674a4463cfa2.tar.lz
cuberite-f44d123ba8ca14c3df90afff85a0674a4463cfa2.tar.xz
cuberite-f44d123ba8ca14c3df90afff85a0674a4463cfa2.tar.zst
cuberite-f44d123ba8ca14c3df90afff85a0674a4463cfa2.zip
Diffstat (limited to '')
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator.h b/src/Simulator/IncrementalRedstoneSimulator.h
index b0d3ad7af..9fbefae73 100644
--- a/src/Simulator/IncrementalRedstoneSimulator.h
+++ b/src/Simulator/IncrementalRedstoneSimulator.h
@@ -76,19 +76,21 @@ private:
{
public:
/// Per-chunk data for the simulator, specified individual chunks to simulate
- std::unordered_map<Vector3i, std::pair<BLOCKTYPE, bool>, Vector3i> m_ChunkData;
+
+ /** test */
+ std::unordered_map<Vector3i, std::pair<BLOCKTYPE, bool>, VectorHasher<int>> m_ChunkData;
std::vector<sPoweredBlocks> m_PoweredBlocks;
std::vector<sLinkedPoweredBlocks> m_LinkedBlocks;
- std::unordered_map<Vector3i, bool, Vector3i> m_SimulatedPlayerToggleableBlocks;
- std::unordered_map<Vector3i, sRepeatersDelayList, Vector3i> m_RepeatersDelayList;
+ std::unordered_map<Vector3i, bool, VectorHasher<int>> m_SimulatedPlayerToggleableBlocks;
+ std::unordered_map<Vector3i, sRepeatersDelayList, VectorHasher<int>> m_RepeatersDelayList;
};
public:
typedef std::vector <sPoweredBlocks> PoweredBlocksList;
typedef std::vector <sLinkedPoweredBlocks> LinkedBlocksList;
- typedef std::unordered_map<Vector3i, bool, Vector3i> SimulatedPlayerToggleableList;
- typedef std::unordered_map<Vector3i, sRepeatersDelayList, Vector3i> RepeatersDelayList;
+ typedef std::unordered_map<Vector3i, bool, VectorHasher<int>> SimulatedPlayerToggleableList;
+ typedef std::unordered_map<Vector3i, sRepeatersDelayList, VectorHasher<int>> RepeatersDelayList;
private: