bkietz commented on a change in pull request #7901:
URL: https://github.com/apache/arrow/pull/7901#discussion_r465750819



##########
File path: cpp/src/arrow/util/formatting.cc
##########
@@ -36,38 +31,29 @@ const char digit_pairs[] =
     "6061626364656667686970717273747576777879"
     "8081828384858687888990919293949596979899";
 
-}  // namespace detail
-
-struct FloatToStringFormatter::Impl {
-  Impl()
-      : converter_(DoubleToStringConverter::EMIT_POSITIVE_EXPONENT_SIGN, 
"inf", "nan",
-                   'e', -6, 10, 6, 0) {}
-
-  DoubleToStringConverter converter_;
-};
-
-FloatToStringFormatter::FloatToStringFormatter() : impl_(new Impl()) {}
+using util::double_conversion::DoubleToStringConverter;
 
-FloatToStringFormatter::~FloatToStringFormatter() {}
+static DoubleToStringConverter g_double_converter(
+    DoubleToStringConverter::EMIT_POSITIVE_EXPONENT_SIGN, "inf", "nan", 'e', 
-6, 10, 6,
+    0);
 
-int FloatToStringFormatter::FormatFloat(float v, char* out_buffer, int 
out_size) {
-  DCHECK_GE(out_size, kMinBufferSize);
+int FormatFloat(float v, size_t buffer_size, char* buffer) {

Review comment:
       I'll make both `int`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to