summaryrefslogtreecommitdiff
path: root/AK/DistinctNumeric.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-16 01:15:21 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-17 00:21:13 +0100
commit216e21a1fa95ffc87c371cdd6262467df8cdb5cd (patch)
treed58f31c31215cce39557cfcc3f35b7795334aa06 /AK/DistinctNumeric.h
parent008355c222980bd3520caeea9848e04dc2230df1 (diff)
downloadserenity-216e21a1fa95ffc87c371cdd6262467df8cdb5cd.zip
AK: Convert AK::Format formatting helpers to returning ErrorOr<void>
This isn't a complete conversion to ErrorOr<void>, but a good chunk. The end goal here is to propagate buffer allocation failures to the caller, and allow the use of TRY() with formatting functions.
Diffstat (limited to 'AK/DistinctNumeric.h')
-rw-r--r--AK/DistinctNumeric.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/DistinctNumeric.h b/AK/DistinctNumeric.h
index 77bb7058d7..c6d98b66bc 100644
--- a/AK/DistinctNumeric.h
+++ b/AK/DistinctNumeric.h
@@ -271,7 +271,7 @@ private:
template<typename T, typename X, bool Incr, bool Cmp, bool Bool, bool Flags, bool Shift, bool Arith>
struct Formatter<DistinctNumeric<T, X, Incr, Cmp, Bool, Flags, Shift, Arith>> : Formatter<T> {
- void format(FormatBuilder& builder, DistinctNumeric<T, X, Incr, Cmp, Bool, Flags, Shift, Arith> value)
+ ErrorOr<void> format(FormatBuilder& builder, DistinctNumeric<T, X, Incr, Cmp, Bool, Flags, Shift, Arith> value)
{
return Formatter<T>::format(builder, value.value());
}