mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00:00
Everywhere: Pass AK::StringView by value
This commit is contained in:
parent
ad5d217e76
commit
8b1108e485
392 changed files with 978 additions and 978 deletions
|
@ -36,7 +36,7 @@ RefPtr<MultiScaleBitmaps> MultiScaleBitmaps::create_empty()
|
|||
return adopt_ref(*new MultiScaleBitmaps());
|
||||
}
|
||||
|
||||
RefPtr<MultiScaleBitmaps> MultiScaleBitmaps::create(StringView const& filename, StringView const& default_filename)
|
||||
RefPtr<MultiScaleBitmaps> MultiScaleBitmaps::create(StringView filename, StringView default_filename)
|
||||
{
|
||||
auto per_scale_bitmap = adopt_ref(*new MultiScaleBitmaps());
|
||||
if (per_scale_bitmap->load(filename, default_filename))
|
||||
|
@ -44,14 +44,14 @@ RefPtr<MultiScaleBitmaps> MultiScaleBitmaps::create(StringView const& filename,
|
|||
return {};
|
||||
}
|
||||
|
||||
bool MultiScaleBitmaps::load(StringView const& filename, StringView const& default_filename)
|
||||
bool MultiScaleBitmaps::load(StringView filename, StringView default_filename)
|
||||
{
|
||||
Optional<Gfx::BitmapFormat> bitmap_format;
|
||||
bool did_load_any = false;
|
||||
|
||||
m_bitmaps.clear(); // If we're reloading the bitmaps get rid of the old ones
|
||||
|
||||
auto add_bitmap = [&](StringView const& path, int scale_factor) {
|
||||
auto add_bitmap = [&](StringView path, int scale_factor) {
|
||||
auto bitmap_or_error = Gfx::Bitmap::try_load_from_file(path, scale_factor);
|
||||
if (bitmap_or_error.is_error())
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue