Commit b498ba0b authored by Victor Zverovich's avatar Victor Zverovich

FormatFloat -> format_float (https://github.com/cppformat/cppformat/issues/50)

parent 37356c3f
......@@ -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) {
......
......@@ -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);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment