Change container type for several uses of std::map/std::set

This commit is contained in:
Jonathan G Rennison
2024-05-30 18:16:13 +01:00
parent 853ed272be
commit 56356bb761
11 changed files with 36 additions and 26 deletions

View File

@@ -14,6 +14,8 @@
#include "gfx_func.h"
#include "core/math_func.hpp"
#include "3rdparty/cpp-btree/btree_map.h"
#include <map>
#include <string>
#include <stack>
@@ -85,7 +87,7 @@ public:
};
/** Mapping from index to font. The pointer is owned by FontColourMap. */
using FontMap = std::map<int, Font *>;
using FontMap = btree::btree_map<int, Font *>;
/**
* Interface to glue fallback and normal layouter into one.
@@ -173,7 +175,7 @@ private:
static LineCacheItem &GetCachedParagraphLayout(std::string_view str, const FontState &state);
using FontColourMap = std::map<TextColour, std::unique_ptr<Font>>;
using FontColourMap = btree::btree_map<TextColour, std::unique_ptr<Font>>;
static FontColourMap fonts[FS_END];
public:
static Font *GetFont(FontSize size, TextColour colour);