Kaynağa Gözat

Changed map type of a O(1) one. Don't know about memory/performance but whatever

Florian DORMONT 10 yıl önce
ebeveyn
işleme
48aed1b634
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      include/Tileset.h

+ 2 - 2
include/Tileset.h

@@ -2,7 +2,7 @@
 #define INCLUDE_TILESET_H
 
 #include <vector>
-#include <map>
+#include <unordered_map>
 
 namespace WalrusRPG
 {
@@ -19,7 +19,7 @@ namespace WalrusRPG
         unsigned sheet_height;
         unsigned tile_width;
         unsigned tile_height;
-        std::map<unsigned, std::vector<Frame>> animations;
+        std::unordered_map<unsigned, std::vector<Frame>> animations;
 
       public:
         Tileset(unsigned short *sheet, unsigned sheet_width, unsigned sheet_height, unsigned tile_width, unsigned tile_heihgt);