Use hash map instead of btree for SpritePointerHolder cache

This commit is contained in:
Jonathan G Rennison 2024-07-06 13:18:59 +01:00
parent 3fd71b2821
commit 18ef0741e7

View File

@ -13,7 +13,7 @@
#include "gfx_type.h"
#include "zoom_type.h"
#include "spriteloader/spriteloader.hpp"
#include "3rdparty/cpp-btree/btree_map.h"
#include "3rdparty/robin_hood/robin_hood.h"
/** Data structure describing a sprite. */
struct Sprite {
@ -82,7 +82,7 @@ uint32_t GetSpriteMainColour(SpriteID sprite_id, PaletteID palette_id);
struct SpritePointerHolder {
private:
btree::btree_map<uint32_t, const void *> cache;
robin_hood::unordered_map<uint32_t, const void *> cache;
public:
inline const Sprite *GetSprite(SpriteID sprite, SpriteType type) const