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

LibGUI: Use String::formatted() and String::number() more

This commit is contained in:
Andreas Kling 2021-01-03 15:26:47 +01:00
parent f181ddb56a
commit 7bb18215cb
15 changed files with 48 additions and 24 deletions

View file

@ -184,7 +184,7 @@ RefPtr<Gfx::Bitmap> load_bmp(const StringView& path)
return nullptr;
auto bitmap = load_bmp_impl((const u8*)mapped_file.data(), mapped_file.size());
if (bitmap)
bitmap->set_mmap_name(String::format("Gfx::Bitmap [%dx%d] - Decoded BMP: %s", bitmap->width(), bitmap->height(), LexicalPath::canonicalized_path(path).characters()));
bitmap->set_mmap_name(String::formatted("Gfx::Bitmap [{}] - Decoded BMP: {}", bitmap->size(), LexicalPath::canonicalized_path(path)));
return bitmap;
}
@ -192,7 +192,7 @@ RefPtr<Gfx::Bitmap> load_bmp_from_memory(const u8* data, size_t length)
{
auto bitmap = load_bmp_impl(data, length);
if (bitmap)
bitmap->set_mmap_name(String::format("Gfx::Bitmap [%dx%d] - Decoded BMP: <memory>", bitmap->width(), bitmap->height()));
bitmap->set_mmap_name(String::formatted("Gfx::Bitmap [{}] - Decoded BMP: <memory>", bitmap->size()));
return bitmap;
}