diff --git a/src/util/format/builder.cpp b/src/util/format/builder.cpp index 5bff2ab..10ceffc 100644 --- a/src/util/format/builder.cpp +++ b/src/util/format/builder.cpp @@ -62,7 +62,15 @@ static constexpr std::string numberToString(size_t value, uint8_t base, bool upp return result; } -void Builder::putU64(size_t value, uint8_t base, bool uppercase, char fill, Align align, Sign sign, bool zeroPadding, size_t width, bool isNegative) const +void Builder::putU64(size_t value, + uint8_t base, + bool uppercase, + char fill, + Align align, + Sign sign, + bool zeroPadding, + size_t width, + bool isNegative) const { std::string string = numberToString(value, base, uppercase); @@ -130,7 +138,14 @@ void Builder::putU64(size_t value, uint8_t base, bool uppercase, char fill, Alig }; } -void Builder::putI64(int64_t value, uint8_t base, bool uppercase, char fill, Align align, Sign sign, bool zeroPadding, size_t width) const +void Builder::putI64(int64_t value, + uint8_t base, + bool uppercase, + char fill, + Align align, + Sign sign, + bool zeroPadding, + size_t width) const { bool isNegative = value < 0; value = isNegative ? -value : value; diff --git a/src/util/format/builder.h b/src/util/format/builder.h index c03afc6..b52a09e 100644 --- a/src/util/format/builder.h +++ b/src/util/format/builder.h @@ -36,8 +36,25 @@ public: void putLiteral(std::string_view literal); - void putU64(size_t value, uint8_t base = 10, bool uppercase = false, char fill = ' ', Align align = Align::Right, Sign sign = Sign::Negative, bool zeroPadding = false, size_t width = 0, bool isNegative = false) const; - void putI64(int64_t value, uint8_t base = 10, bool uppercase = false, char fill = ' ', Align align = Align::Right, Sign sign = Sign::Negative, bool zeroPadding = false, size_t width = 0) const; + void putU64(size_t value, + uint8_t base = 10, + bool uppercase = false, + char fill = ' ', + Align align = Align::Right, + Sign sign = Sign::Negative, + bool zeroPadding = false, + size_t width = 0, + bool isNegative = false) const; + + void putI64(int64_t value, + uint8_t base = 10, + bool uppercase = false, + char fill = ' ', + Align align = Align::Right, + Sign sign = Sign::Negative, + bool zeroPadding = false, + size_t width = 0) const; + void putF64(double number, uint8_t precision = 6) const; void putCharacter(char character) const { m_builder.write(&character, 1); } void putString(std::string_view string, char fill = ' ', Align align = Align::Left, size_t width = 0) const;