Noise: Prevent unittest crash caused by division by zero
[oweals/minetest.git] / src / mapsector.h
index c3bff3575932432ff693e5fe16c50913a88984aa..9a965932f7e89ec46d0d73271c8997d5e417411b 100644 (file)
@@ -66,12 +66,12 @@ public:
        bool empty() const { return m_blocks.empty(); }
 
        // Always false at the moment, because sector contains no metadata.
-       bool differs_from_disk;
+       bool differs_from_disk = false;
 
 protected:
 
        // The pile of MapBlocks
-       UNORDERED_MAP<s16, MapBlock*> m_blocks;
+       std::unordered_map<s16, MapBlock*> m_blocks;
 
        Map *m_parent;
        // Position on parent (in MapBlock widths)
@@ -80,8 +80,8 @@ protected:
        IGameDef *m_gamedef;
 
        // Last-used block is cached here for quicker access.
-       // Be sure to set this to NULL when the cached block is deleted
-       MapBlock *m_block_cache;
+       // Be sure to set this to nullptr when the cached block is deleted
+       MapBlock *m_block_cache = nullptr;
        s16 m_block_cache_y;
 
        /*