]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/face_position_cache.h
fix integer overflow in mapgen (#11641)
[dragonfireclient.git] / src / face_position_cache.h
index c1d2841c44e485a8d1cd5e6371032f9865826ebd..36cb06484f1724d4706ccda8cd21b4145a111108 100644 (file)
@@ -17,15 +17,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#ifndef FACE_POSITION_CACHE_HEADER
-#define FACE_POSITION_CACHE_HEADER
+#pragma once
 
 #include "irr_v3d.h"
-#include "threading/mutex.h"
-#include "util/cpp11_container.h"
 
 #include <map>
 #include <vector>
+#include <unordered_map>
+#include <mutex>
 
 /*
  * This class permits caching getFacePosition call results.
@@ -37,8 +36,6 @@ class FacePositionCache {
 
 private:
        static const std::vector<v3s16> &generateFacePosition(u16 d);
-       static UNORDERED_MAP<u16, std::vector<v3s16> > cache;
-       static Mutex cache_mutex;
+       static std::unordered_map<u16, std::vector<v3s16>> cache;
+       static std::mutex cache_mutex;
 };
-
-#endif