aboutsummaryrefslogtreecommitdiff
path: root/src/common/Format.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2024-06-24 00:06:25 +0800
committercrupest <crupest@outlook.com>2024-08-18 16:50:20 +0800
commit1b30150ab79ff1338f209a8ddb54b3dc60cfb599 (patch)
tree97e183587b293ecf768476da0edf3fdcf86e4543 /src/common/Format.cpp
parentb756bf519cda0684ec46d0d9404cbc59741ec0cb (diff)
downloadcru-1b30150ab79ff1338f209a8ddb54b3dc60cfb599.tar.gz
cru-1b30150ab79ff1338f209a8ddb54b3dc60cfb599.tar.bz2
cru-1b30150ab79ff1338f209a8ddb54b3dc60cfb599.zip
fix(SubProcess): fix pipe fs close, add tests.
NEED TEST: BufferStream, AutoReadStream, SubProcess.
Diffstat (limited to 'src/common/Format.cpp')
-rw-r--r--src/common/Format.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/common/Format.cpp b/src/common/Format.cpp
index 0ae744fc..d58c90b7 100644
--- a/src/common/Format.cpp
+++ b/src/common/Format.cpp
@@ -1,25 +1,6 @@
#include "cru/common/Format.h"
-#include <double-conversion/utils.h>
namespace cru {
-
-double_conversion::DoubleToStringConverter kDefaultDoubleToStringConverter(
- 0, "infinity", "nan", 'e', -6, 21, 6, 1);
-
-String ToString(float value, StringView option) {
- char buffer[50];
- double_conversion::StringBuilder string_builder(buffer, sizeof(buffer));
- kDefaultDoubleToStringConverter.ToShortestSingle(value, &string_builder);
- return String::FromUtf8(std::string_view(buffer, string_builder.position()));
-}
-
-String ToString(double value, StringView option) {
- char buffer[50];
- double_conversion::StringBuilder string_builder(buffer, sizeof(buffer));
- kDefaultDoubleToStringConverter.ToShortestSingle(value, &string_builder);
- return String::FromUtf8(std::string_view(buffer, string_builder.position()));
-}
-
namespace details {
FormatToken ParsePlaceHolder(String place_holder_string) {
if (place_holder_string.empty()) {