Procházet zdrojové kódy

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

Florian DORMONT před 10 roky
rodič
revize
48aed1b634
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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);