From b498ba0bc5455e8f19b29d3f385f79cbe2f51c4f Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 26 Jul 2014 08:03:03 -0700 Subject: [PATCH] FormatFloat -> format_float (https://github.com/cppformat/cppformat/issues/50) --- format.cc | 6 +++--- format.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/format.cc b/format.cc index 0451851b..34108ee7 100644 --- a/format.cc +++ b/format.cc @@ -223,7 +223,7 @@ void fmt::SystemError::init( } template -int fmt::internal::CharTraits::FormatFloat( +int fmt::internal::CharTraits::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::FormatFloat( } template -int fmt::internal::CharTraits::FormatFloat( +int fmt::internal::CharTraits::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::write_double(T value, const FormatSpec &spec) { } #endif Char *start = &buffer_[offset]; - int n = internal::CharTraits::FormatFloat( + int n = internal::CharTraits::format_float( start, size, format, width_for_sprintf, spec.precision(), value); if (n >= 0 && offset + n < buffer_.capacity()) { if (sign) { diff --git a/format.h b/format.h index 2ab6dfde..3dcfdb7e 100644 --- a/format.h +++ b/format.h @@ -366,7 +366,7 @@ public: // Formats a floating-point number. template - 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 : public BasicCharTraits { static wchar_t convert(wchar_t value) { return value; } template - 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); };