1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:58:11 +00:00

StringViewize a bunch of things -- mostly LibGUI

This commit is contained in:
Robin Burchell 2019-06-02 14:58:02 +02:00 committed by Andreas Kling
parent f9ba7adae2
commit 1024dfa81a
59 changed files with 129 additions and 139 deletions

View file

@ -38,14 +38,14 @@ GFontDatabase::~GFontDatabase()
{
}
void GFontDatabase::for_each_font(Function<void(const String&)> callback)
void GFontDatabase::for_each_font(Function<void(const StringView&)> callback)
{
for (auto& it : m_name_to_metadata) {
callback(it.key);
}
}
void GFontDatabase::for_each_fixed_width_font(Function<void(const String&)> callback)
void GFontDatabase::for_each_fixed_width_font(Function<void(const StringView&)> callback)
{
for (auto& it : m_name_to_metadata) {
if (it.value.is_fixed_width)
@ -53,7 +53,7 @@ void GFontDatabase::for_each_fixed_width_font(Function<void(const String&)> call
}
}
RetainPtr<Font> GFontDatabase::get_by_name(const String& name)
RetainPtr<Font> GFontDatabase::get_by_name(const StringView& name)
{
auto it = m_name_to_metadata.find(name);
if (it == m_name_to_metadata.end())