mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
FormatFloat -> format_float (https://github.com/cppformat/cppformat/issues/50)
This commit is contained in:
parent
37356c3f5e
commit
b498ba0bc5
@ -223,7 +223,7 @@ void fmt::SystemError::init(
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
int fmt::internal::CharTraits<char>::FormatFloat(
|
||||
int fmt::internal::CharTraits<char>::format_float(
|
||||
char *buffer, std::size_t size, const char *format,
|
||||
unsigned width, int precision, T value) {
|
||||
if (width == 0) {
|
||||
@ -237,7 +237,7 @@ int fmt::internal::CharTraits<char>::FormatFloat(
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
int fmt::internal::CharTraits<wchar_t>::FormatFloat(
|
||||
int fmt::internal::CharTraits<wchar_t>::format_float(
|
||||
wchar_t *buffer, std::size_t size, const wchar_t *format,
|
||||
unsigned width, int precision, T value) {
|
||||
if (width == 0) {
|
||||
@ -614,7 +614,7 @@ void fmt::BasicWriter<Char>::write_double(T value, const FormatSpec &spec) {
|
||||
}
|
||||
#endif
|
||||
Char *start = &buffer_[offset];
|
||||
int n = internal::CharTraits<Char>::FormatFloat(
|
||||
int n = internal::CharTraits<Char>::format_float(
|
||||
start, size, format, width_for_sprintf, spec.precision(), value);
|
||||
if (n >= 0 && offset + n < buffer_.capacity()) {
|
||||
if (sign) {
|
||||
|
4
format.h
4
format.h
@ -366,7 +366,7 @@ public:
|
||||
|
||||
// Formats a floating-point number.
|
||||
template <typename T>
|
||||
static int FormatFloat(char *buffer, std::size_t size,
|
||||
static int format_float(char *buffer, std::size_t size,
|
||||
const char *format, unsigned width, int precision, T value);
|
||||
};
|
||||
|
||||
@ -379,7 +379,7 @@ class CharTraits<wchar_t> : public BasicCharTraits<wchar_t> {
|
||||
static wchar_t convert(wchar_t value) { return value; }
|
||||
|
||||
template <typename T>
|
||||
static int FormatFloat(wchar_t *buffer, std::size_t size,
|
||||
static int format_float(wchar_t *buffer, std::size_t size,
|
||||
const wchar_t *format, unsigned width, int precision, T value);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user