BAN: Rename BAN::Formatter argument overload thing

This commit is contained in:
Bananymous 2022-12-13 12:30:48 +02:00
parent 334abe6b27
commit 3cda527987
2 changed files with 20 additions and 20 deletions

View File

@ -71,7 +71,7 @@ private:
namespace BAN::Formatter
{
template<void(*PUTC_LIKE)(char)>
void print_value(const Error& error, const ValueFormat& format)
void print_argument_impl(const Error& error, const ValueFormat& format)
{
if (error.GetErrorCode() == 0xFF)
print<PUTC_LIKE>(error.GetMessage());

View File

@ -21,7 +21,7 @@ namespace BAN::Formatter
static size_t print_argument(const char* format, T arg);
template<void(*PUTC_LIKE)(char), typename T>
static void print_value(T value, const ValueFormat& format);
static void print_argument_impl(T value, const ValueFormat& format);
/*
@ -131,7 +131,7 @@ namespace BAN::Formatter
if (format[i] != '}')
return size_t(-1);
print_value<PUTC_LIKE>(argument, value_format);
print_argument_impl<PUTC_LIKE>(argument, value_format);
return i + 1;
}
@ -227,27 +227,27 @@ namespace BAN::Formatter
*/
template<void(*PUTC_LIKE)(char)> void print_value(short value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(int value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(long value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(long long value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(short value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(int value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(long value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(long long value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(unsigned short value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(unsigned int value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(unsigned long value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(unsigned long long value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(unsigned short value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(unsigned int value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(unsigned long value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(unsigned long long value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(float value, const ValueFormat& format) { print_floating<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(double value, const ValueFormat& format) { print_floating<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(long double value, const ValueFormat& format) { print_floating<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(float value, const ValueFormat& format) { print_floating<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(double value, const ValueFormat& format) { print_floating<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(long double value, const ValueFormat& format) { print_floating<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(char value, const ValueFormat&) { PUTC_LIKE(value); }
template<void(*PUTC_LIKE)(char)> void print_value(signed char value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(unsigned char value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(char value, const ValueFormat&) { PUTC_LIKE(value); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(signed char value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(unsigned char value, const ValueFormat& format) { print_integer<PUTC_LIKE>(value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(bool value, const ValueFormat& format) { print<PUTC_LIKE>(value ? "true" : "false"); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(bool value, const ValueFormat& format) { print<PUTC_LIKE>(value ? "true" : "false"); }
template<void(*PUTC_LIKE)(char), typename T> void print_value(T* value, const ValueFormat& format) { print_pointer<PUTC_LIKE>((void*)value, format); }
template<void(*PUTC_LIKE)(char)> void print_value(const char* value, const ValueFormat&) { print<PUTC_LIKE>(value);}
template<void(*PUTC_LIKE)(char), typename T> void print_argument_impl(T* value, const ValueFormat& format) { print_pointer<PUTC_LIKE>((void*)value, format); }
template<void(*PUTC_LIKE)(char)> void print_argument_impl(const char* value, const ValueFormat&) { print<PUTC_LIKE>(value);}
}