LibTTF: Make load_from_file() take String instead of StringView

This commit is contained in:
Andreas Kling 2021-04-17 00:46:43 +02:00
commit 36f27094d0
Notes: sideshowbarker 2024-07-18 19:32:39 +09:00
2 changed files with 3 additions and 3 deletions

View file

@ -225,9 +225,9 @@ GlyphHorizontalMetrics Hmtx::get_glyph_horizontal_metrics(u32 glyph_id) const
};
}
RefPtr<Font> Font::load_from_file(const StringView& path, unsigned index)
RefPtr<Font> Font::load_from_file(String path, unsigned index)
{
auto file_or_error = Core::File::open(String(path), Core::IODevice::ReadOnly);
auto file_or_error = Core::File::open(move(path), Core::IODevice::ReadOnly);
if (file_or_error.is_error()) {
dbgln("Could not open file: {}", file_or_error.error());
return nullptr;