forked from fmtlib/fmt
FormatFloat -> format_float (https://github.com/cppformat/cppformat/issues/50)
This commit is contained in:
@ -223,7 +223,7 @@ void fmt::SystemError::init(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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,
|
char *buffer, std::size_t size, const char *format,
|
||||||
unsigned width, int precision, T value) {
|
unsigned width, int precision, T value) {
|
||||||
if (width == 0) {
|
if (width == 0) {
|
||||||
@ -237,7 +237,7 @@ int fmt::internal::CharTraits<char>::FormatFloat(
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
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,
|
wchar_t *buffer, std::size_t size, const wchar_t *format,
|
||||||
unsigned width, int precision, T value) {
|
unsigned width, int precision, T value) {
|
||||||
if (width == 0) {
|
if (width == 0) {
|
||||||
@ -614,7 +614,7 @@ void fmt::BasicWriter<Char>::write_double(T value, const FormatSpec &spec) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
Char *start = &buffer_[offset];
|
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);
|
start, size, format, width_for_sprintf, spec.precision(), value);
|
||||||
if (n >= 0 && offset + n < buffer_.capacity()) {
|
if (n >= 0 && offset + n < buffer_.capacity()) {
|
||||||
if (sign) {
|
if (sign) {
|
||||||
|
4
format.h
4
format.h
@ -366,7 +366,7 @@ public:
|
|||||||
|
|
||||||
// Formats a floating-point number.
|
// Formats a floating-point number.
|
||||||
template <typename T>
|
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);
|
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; }
|
static wchar_t convert(wchar_t value) { return value; }
|
||||||
|
|
||||||
template <typename T>
|
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);
|
const wchar_t *format, unsigned width, int precision, T value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user