Skip to content

Commit

Permalink
refactor core: remove text::Format with boost::multipercision
Browse files Browse the repository at this point in the history
remove text::Format with boost::multipercision

Tests: протестировано CI
  • Loading branch information
alexiprof committed Dec 27, 2023
1 parent 150e662 commit 07bb2c7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
5 changes: 0 additions & 5 deletions core/include/userver/utils/text.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

#include <locale>

#include <boost/multiprecision/cpp_dec_float.hpp>

#include <userver/utils/text_light.hpp>

USERVER_NAMESPACE_BEGIN
Expand All @@ -20,9 +18,6 @@ inline const std::string kEnLocale{"en_US.UTF-8"};
std::string Format(double value, const std::string& locale, int ndigits = 0,
bool is_fixed = true);

/// Return cpp_dec_float_50 formatted
std::string Format(boost::multiprecision::cpp_dec_float_50 value, int ndigits);

/// Transform letters to lower case
std::string ToLower(std::string_view str,
const std::string& locale = kEnLocale);
Expand Down
6 changes: 0 additions & 6 deletions core/src/utils/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ std::string Format(double value, const std::string& locale, int ndigits,
return res.str();
}

std::string Format(boost::multiprecision::cpp_dec_float_50 value, int ndigits) {
std::stringstream res;
res << std::setprecision(ndigits) << value;
return res.str();
}

std::string ToLower(std::string_view str, const std::string& locale) {
return boost::locale::to_lower(str.data(), str.data() + str.size(),
GetLocale(locale));
Expand Down

0 comments on commit 07bb2c7

Please sign in to comment.