diff --git a/include/fmt/format.h b/include/fmt/format.h index b082b456..32317c77 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -3036,34 +3036,6 @@ class format_int { std::string str() const { return std::string(str_, size()); } }; -// Formats a decimal integer value writing into buffer and returns -// a pointer to the end of the formatted string. This function doesn't -// write a terminating null character. -template -FMT_DEPRECATED inline void format_decimal(char*& buffer, T value) { - typedef typename internal::int_traits::main_type main_type; - main_type abs_value = static_cast(value); - if (internal::is_negative(value)) { - *buffer++ = '-'; - abs_value = 0 - abs_value; - } - if (abs_value < 100) { - if (abs_value < 10) { - *buffer++ = static_cast('0' + abs_value); - return; - } - unsigned index = static_cast(abs_value * 2); - *buffer++ = internal::data::DIGITS[index]; - *buffer++ = internal::data::DIGITS[index + 1]; - return; - } - int num_digits = internal::count_digits(abs_value); - internal::format_decimal( - internal::make_checked(buffer, internal::to_unsigned(num_digits)), - abs_value, num_digits); - buffer += num_digits; -} - // Formatter of objects of type T. template struct formatter