From 3cda52798753a11e0bbc107e3f7cf103d9347b6c Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 13 Dec 2022 12:30:48 +0200 Subject: [PATCH] BAN: Rename BAN::Formatter argument overload thing --- BAN/include/BAN/Errors.h | 2 +- BAN/include/BAN/Formatter.h | 38 ++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/BAN/include/BAN/Errors.h b/BAN/include/BAN/Errors.h index 2c836e715..b35de213e 100644 --- a/BAN/include/BAN/Errors.h +++ b/BAN/include/BAN/Errors.h @@ -71,7 +71,7 @@ private: namespace BAN::Formatter { template - void print_value(const Error& error, const ValueFormat& format) + void print_argument_impl(const Error& error, const ValueFormat& format) { if (error.GetErrorCode() == 0xFF) print(error.GetMessage()); diff --git a/BAN/include/BAN/Formatter.h b/BAN/include/BAN/Formatter.h index 85e7b40ac..8574134f4 100644 --- a/BAN/include/BAN/Formatter.h +++ b/BAN/include/BAN/Formatter.h @@ -21,7 +21,7 @@ namespace BAN::Formatter static size_t print_argument(const char* format, T arg); template - 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(argument, value_format); + print_argument_impl(argument, value_format); return i + 1; } @@ -227,27 +227,27 @@ namespace BAN::Formatter */ - template void print_value(short value, const ValueFormat& format) { print_integer(value, format); } - template void print_value(int value, const ValueFormat& format) { print_integer(value, format); } - template void print_value(long value, const ValueFormat& format) { print_integer(value, format); } - template void print_value(long long value, const ValueFormat& format) { print_integer(value, format); } + template void print_argument_impl(short value, const ValueFormat& format) { print_integer(value, format); } + template void print_argument_impl(int value, const ValueFormat& format) { print_integer(value, format); } + template void print_argument_impl(long value, const ValueFormat& format) { print_integer(value, format); } + template void print_argument_impl(long long value, const ValueFormat& format) { print_integer(value, format); } - template void print_value(unsigned short value, const ValueFormat& format) { print_integer(value, format); } - template void print_value(unsigned int value, const ValueFormat& format) { print_integer(value, format); } - template void print_value(unsigned long value, const ValueFormat& format) { print_integer(value, format); } - template void print_value(unsigned long long value, const ValueFormat& format) { print_integer(value, format); } + template void print_argument_impl(unsigned short value, const ValueFormat& format) { print_integer(value, format); } + template void print_argument_impl(unsigned int value, const ValueFormat& format) { print_integer(value, format); } + template void print_argument_impl(unsigned long value, const ValueFormat& format) { print_integer(value, format); } + template void print_argument_impl(unsigned long long value, const ValueFormat& format) { print_integer(value, format); } - template void print_value(float value, const ValueFormat& format) { print_floating(value, format); } - template void print_value(double value, const ValueFormat& format) { print_floating(value, format); } - template void print_value(long double value, const ValueFormat& format) { print_floating(value, format); } + template void print_argument_impl(float value, const ValueFormat& format) { print_floating(value, format); } + template void print_argument_impl(double value, const ValueFormat& format) { print_floating(value, format); } + template void print_argument_impl(long double value, const ValueFormat& format) { print_floating(value, format); } - template void print_value(char value, const ValueFormat&) { PUTC_LIKE(value); } - template void print_value(signed char value, const ValueFormat& format) { print_integer(value, format); } - template void print_value(unsigned char value, const ValueFormat& format) { print_integer(value, format); } + template void print_argument_impl(char value, const ValueFormat&) { PUTC_LIKE(value); } + template void print_argument_impl(signed char value, const ValueFormat& format) { print_integer(value, format); } + template void print_argument_impl(unsigned char value, const ValueFormat& format) { print_integer(value, format); } - template void print_value(bool value, const ValueFormat& format) { print(value ? "true" : "false"); } + template void print_argument_impl(bool value, const ValueFormat& format) { print(value ? "true" : "false"); } - template void print_value(T* value, const ValueFormat& format) { print_pointer((void*)value, format); } - template void print_value(const char* value, const ValueFormat&) { print(value);} + template void print_argument_impl(T* value, const ValueFormat& format) { print_pointer((void*)value, format); } + template void print_argument_impl(const char* value, const ValueFormat&) { print(value);} }