mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
Meta+Userland: Simplify some formatters
These are mostly minor mistakes I've encountered while working on the removal of StringView(char const*). The usage of builder.put_string over Format<FormatString>::format is preferrable as it will avoid the indirection altogether when there's no formatting to be done. Similarly, there is no need to do format(builder, "{}", number) when builder.put_u64(number) works equally well. Additionally a few Strings where only constant strings were used are replaced with StringViews.
This commit is contained in:
parent
7da00bfa8d
commit
7456904a39
Notes:
sideshowbarker
2024-07-17 09:27:58 +09:00
Author: https://github.com/sin-ack
Commit: 7456904a39
Pull-request: https://github.com/SerenityOS/serenity/pull/14555
Reviewed-by: https://github.com/Dexesttp ✅
Reviewed-by: https://github.com/kleinesfilmroellchen
9 changed files with 64 additions and 67 deletions
|
@ -86,8 +86,7 @@ struct Traits<GUI::PersistentModelIndex> : public GenericTraits<GUI::PersistentM
|
|||
{
|
||||
if (index.has_valid_handle())
|
||||
return Traits<GUI::ModelIndex>::hash(index.m_handle->m_index);
|
||||
else
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue