aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/misc/guid.cpp
diff options
context:
space:
mode:
authorprime <prime@yandex-team.ru>2022-02-10 16:46:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:01 +0300
commite34f3f0e381020a427f44fbd50463d9a04089db3 (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/yt/misc/guid.cpp
parent3695a7cd42b74a4987d8d5a8f2e2443556998943 (diff)
downloadydb-e34f3f0e381020a427f44fbd50463d9a04089db3.tar.gz
Restoring authorship annotation for <prime@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yt/misc/guid.cpp')
-rw-r--r--library/cpp/yt/misc/guid.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/library/cpp/yt/misc/guid.cpp b/library/cpp/yt/misc/guid.cpp
index 501b9630cb..882787d7a2 100644
--- a/library/cpp/yt/misc/guid.cpp
+++ b/library/cpp/yt/misc/guid.cpp
@@ -115,28 +115,28 @@ bool TGuid::FromStringHex32(TStringBuf str, TGuid* result)
return false;
}
- bool ok = true;
- int i = 0;
- auto parseChar = [&] {
- const char c = str[i++];
- ui32 digit = 0;
- if ('0' <= c && c <= '9') {
- digit = c - '0';
- } else if ('a' <= c && c <= 'f') {
- digit = c - 'a' + 10;
- } else if ('A' <= c && c <= 'F') {
- digit = c - 'A' + 10;
- } else {
- ok = false;
- }
- return digit;
- };
-
- for (size_t j = 0; j < 16; ++j) {
- result->ReversedParts8[15 - j] = parseChar() * 16 + parseChar();
+ bool ok = true;
+ int i = 0;
+ auto parseChar = [&] {
+ const char c = str[i++];
+ ui32 digit = 0;
+ if ('0' <= c && c <= '9') {
+ digit = c - '0';
+ } else if ('a' <= c && c <= 'f') {
+ digit = c - 'a' + 10;
+ } else if ('A' <= c && c <= 'F') {
+ digit = c - 'A' + 10;
+ } else {
+ ok = false;
+ }
+ return digit;
+ };
+
+ for (size_t j = 0; j < 16; ++j) {
+ result->ReversedParts8[15 - j] = parseChar() * 16 + parseChar();
}
- return ok;
+ return ok;
}
char* WriteGuidToBuffer(char* ptr, TGuid value)