aboutsummaryrefslogtreecommitdiffstats
path: root/util/string/cast.cpp
diff options
context:
space:
mode:
authorsereglond <sereglond@yandex-team.ru>2022-02-10 16:47:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:46 +0300
commiteb3d925534734c808602b31b38b953677f0a279f (patch)
tree4222ef8dc375ee9f30b68a004ee42a0845e005b6 /util/string/cast.cpp
parent4c8065245df3ea26b7757bcb1f8218df287f9148 (diff)
downloadydb-eb3d925534734c808602b31b38b953677f0a279f.tar.gz
Restoring authorship annotation for <sereglond@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/string/cast.cpp')
-rw-r--r--util/string/cast.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/util/string/cast.cpp b/util/string/cast.cpp
index aa1e65a8e9..4fb09cdd0c 100644
--- a/util/string/cast.cpp
+++ b/util/string/cast.cpp
@@ -29,7 +29,7 @@ using double_conversion::StringToDoubleConverter;
/*
* ------------------------------ formatters ------------------------------
*/
-
+
namespace {
constexpr char IntToChar[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
@@ -55,12 +55,12 @@ namespace {
std::enable_if_t<std::is_signed<T>::value, std::make_unsigned_t<T>> NegateNegativeSigned(T value) noexcept {
return std::make_unsigned_t<T>(-(value + 1)) + std::make_unsigned_t<T>(1);
}
-
+
template <class T>
std::enable_if_t<std::is_unsigned<T>::value, std::make_unsigned_t<T>> NegateNegativeSigned(T) noexcept {
Y_UNREACHABLE();
}
-
+
template <class T>
std::make_signed_t<T> NegatePositiveSigned(T value) noexcept {
return value > 0 ? (-std::make_signed_t<T>(value - 1) - 1) : 0;
@@ -70,7 +70,7 @@ namespace {
struct TBasicIntFormatter {
static_assert(1 < base && base < 17, "expect 1 < base && base < 17");
static_assert(std::is_unsigned<T>::value, "TBasicIntFormatter can only handle unsigned integers.");
-
+
static inline size_t Format(T value, TChar* buf, size_t len) {
Y_ENSURE(len, TStringBuf("zero length"));
@@ -421,8 +421,8 @@ namespace {
template <> \
size_t IntToString<BASE, TYPE>(TYPE value, char* buf, size_t len) { \
return FormatInt<ITYPE, BASE, char>(value, buf, len); \
- }
-
+ }
+
#define DEF_INT_SPEC_I(TYPE, ITYPE) \
template <> \
size_t ToStringImpl<TYPE>(TYPE value, char* buf, size_t len) { \
@@ -586,7 +586,7 @@ bool TryFromStringImpl<TUtf16String>(const wchar16* data, size_t len, TUtf16Stri
} \
return status; \
}
-
+
#define DEF_INT_SPEC_II(CHAR, TYPE, ITYPE, BOUNDS) \
template <> \
TYPE FromStringImpl<TYPE>(const CHAR* data, size_t len) { \