[core] Switch to ankerl::unordered_dense

Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
x7z4w
2025-11-24 17:34:56 +00:00
parent 046fe903d1
commit b4e9bbb8d2
303 changed files with 4506 additions and 1577 deletions

View File

@@ -258,7 +258,7 @@ FreetypeError constexpr g_FT_Errors[] =
FT_StreamRec_ m_stream;
FT_Face m_fontFace;
std::unordered_set<uint16_t> m_readyGlyphs;
ankerl::unordered_dense::set<uint16_t> m_readyGlyphs;
hb_font_t * m_harfbuzzFont{nullptr};
};
@@ -332,13 +332,13 @@ FreetypeError constexpr g_FT_Errors[] =
std::string const lang = languages::GetCurrentOrig();
hb_language_t const m_language = hb_language_from_string(lang.data(), static_cast<int>(lang.size()));
// Required to use std::string_view as a search key for std::unordered_map::find().
// Required to use std::string_view as a search key for ankerl::unordered_dense::map::find().
struct StringHash : public std::hash<std::string_view>
{
using is_transparent = void;
};
std::unordered_map<std::string, text::TextMetrics, StringHash, std::equal_to<>> m_textMetricsCache;
ankerl::unordered_dense::map<std::string, text::TextMetrics, StringHash, std::equal_to<>> m_textMetricsCache;
hb_buffer_t * m_harfbuzzBuffer;
};