diff --git a/src/util/format/builder.h b/src/util/format/builder.h index 6c418e1..cb388da 100644 --- a/src/util/format/builder.h +++ b/src/util/format/builder.h @@ -17,16 +17,16 @@ class Builder { public: enum class Align : uint8_t { None, - Left = 60, // '<' - Right = 62, // '>' - Center = 94, // '^' + Left = '<', + Right = '>', + Center = '^', }; enum class Sign : uint8_t { None, - Negative = 45, // '-' - Both = 43, // '+' - Space = 32, // ' ' + Negative = '-', + Both = '+', + Space = ' ', }; explicit Builder(std::stringstream& builder) diff --git a/src/util/format/formatter.cpp b/src/util/format/formatter.cpp index aef77c0..dd88101 100644 --- a/src/util/format/formatter.cpp +++ b/src/util/format/formatter.cpp @@ -4,8 +4,7 @@ * SPDX-License-Identifier: MIT */ -#include // size_t -#include // int32_t, uint32_t, int64_t, +#include // uint8_t #include // strlen #include #include diff --git a/src/util/format/formatter.h b/src/util/format/formatter.h index 384f484..10e011e 100644 --- a/src/util/format/formatter.h +++ b/src/util/format/formatter.h @@ -23,29 +23,29 @@ namespace Util::Format { enum class PresentationType : uint8_t { - None, // Defaults are any of: 'dgcsp', depending on the type + None, // Interger - Binary = 98, // 'b' - BinaryUppercase = 66, // 'B' - Decimal = 100, // 'd' - Octal = 111, // 'o' - Hex = 120, // 'x' - HexUppercase = 88, // 'X' + Binary = 'b', + BinaryUppercase = 'B', + Decimal = 'd', + Octal = 'o', + Hex = 'x', + HexUppercase = 'X', // Floating-point - Hexfloat = 97, // 'a' - HexfloatUppercase = 65, // 'A' - Exponent = 101, // 'e' - ExponentUppercase = 69, // 'E' - FixedPoint = 102, // 'f' - FixedPointUppercase = 70, // 'F' - General = 103, // 'g' - GeneralUppercase = 71, // 'G' + Hexfloat = 'a', + HexfloatUppercase = 'A', + Exponent = 'e', + ExponentUppercase = 'E', + FixedPoint = 'f', + FixedPointUppercase = 'F', + General = 'g', + GeneralUppercase = 'G', // Character - Character = 99, // 'c' + Character = 'c', // String - String = 115, // 's' + String = 's', // Pointer - Pointer = 112, // 'p' + Pointer = 'p', }; struct Specifier {