diff --git a/Modules/Core/Common/src/itkNumberToString.cxx b/Modules/Core/Common/src/itkNumberToString.cxx index a739e45c2de..46cf74efd33 100644 --- a/Modules/Core/Common/src/itkNumberToString.cxx +++ b/Modules/Core/Common/src/itkNumberToString.cxx @@ -23,23 +23,6 @@ namespace { -bool -ConvertToShortest(const double_conversion::DoubleToStringConverter & converter, - const double val, - double_conversion::StringBuilder & builder) -{ - return converter.ToShortest(val, &builder); -} - -bool -ConvertToShortest(const double_conversion::DoubleToStringConverter & converter, - const float val, - double_conversion::StringBuilder & builder) -{ - // Call the converter member function that is specific for single-precision `float`. - return converter.ToShortestSingle(val, &builder); -} - template std::string FloatingPointNumberToString(const TValue val) @@ -52,7 +35,7 @@ FloatingPointNumberToString(const TValue val) double_conversion::StringBuilder builder(buf, sizeof(buf)); - if (!ConvertToShortest(double_conversion::DoubleToStringConverter::EcmaScriptConverter(), val, builder)) + if (!double_conversion::DoubleToStringConverter::EcmaScriptConverter().ToShortestString(val, &builder)) { itkGenericExceptionMacro(<< "Conversion failed for " << val); }