Browse Source

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

Florian DORMONT 10 years ago
parent
commit
48aed1b634
1 changed files with 2 additions and 2 deletions
  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);