mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-18 08:54:37 +00:00
[core] Switch to ankerl::unordered_dense
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user