mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
AK: Move StandardFormatter argument into base class initializer
Subclasses of StandardFormatter don't need to use the formatter argument in their constructor, so move() it into the base class initializer.
This commit is contained in:
parent
74e8aa73e5
commit
2c4f7fae1e
Notes:
sideshowbarker
2024-07-18 01:07:47 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/2c4f7fae1e4 Pull-request: https://github.com/SerenityOS/serenity/pull/10737 Reviewed-by: https://github.com/BenWiederhake Reviewed-by: https://github.com/PeterBindels-TomTom Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/dascandy Reviewed-by: https://github.com/trflynn89
1 changed files with 3 additions and 3 deletions
|
@ -294,7 +294,7 @@ template<typename T>
|
|||
struct Formatter<T, typename EnableIf<IsIntegral<T>>::Type> : StandardFormatter {
|
||||
Formatter() = default;
|
||||
explicit Formatter(StandardFormatter formatter)
|
||||
: StandardFormatter(formatter)
|
||||
: StandardFormatter(move(formatter))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -305,7 +305,7 @@ template<>
|
|||
struct Formatter<StringView> : StandardFormatter {
|
||||
Formatter() = default;
|
||||
explicit Formatter(StandardFormatter formatter)
|
||||
: StandardFormatter(formatter)
|
||||
: StandardFormatter(move(formatter))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -317,7 +317,7 @@ requires(HasFormatter<T>) struct Formatter<Vector<T>> : StandardFormatter {
|
|||
|
||||
Formatter() = default;
|
||||
explicit Formatter(StandardFormatter formatter)
|
||||
: StandardFormatter(formatter)
|
||||
: StandardFormatter(move(formatter))
|
||||
{
|
||||
}
|
||||
void format(FormatBuilder& builder, Vector<T> value)
|
||||
|
|
Loading…
Reference in a new issue