소스 검색

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

Florian DORMONT 10 년 전
부모
커밋
48aed1b634
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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);