diff options
author | eeight <eeight@yandex-team.ru> | 2022-02-10 16:46:18 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:18 +0300 |
commit | 475c0a46f28166e83fd263badc7546377cddcabe (patch) | |
tree | 39c5a49b8aaad78fe390b6f1f2886bdbda40f3e7 /library/cpp/containers/comptrie/chunked_helpers_trie.h | |
parent | a6e0145a095c7bb3770d6e07aee301de5c73f96e (diff) | |
download | ydb-475c0a46f28166e83fd263badc7546377cddcabe.tar.gz |
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/containers/comptrie/chunked_helpers_trie.h')
-rw-r--r-- | library/cpp/containers/comptrie/chunked_helpers_trie.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/containers/comptrie/chunked_helpers_trie.h b/library/cpp/containers/comptrie/chunked_helpers_trie.h index cfa35f5ba2..02e998607c 100644 --- a/library/cpp/containers/comptrie/chunked_helpers_trie.h +++ b/library/cpp/containers/comptrie/chunked_helpers_trie.h @@ -85,7 +85,7 @@ public: bool Get(const char* key, T* value) const { ui64 trieValue; if (Trie.Find(key, strlen(key), &trieValue)) { - *value = ReadUnaligned<T>(&trieValue); + *value = ReadUnaligned<T>(&trieValue); return true; } else { return false; @@ -95,7 +95,7 @@ public: T Get(const char* key, T def = T()) const { ui64 trieValue; if (Trie.Find(key, strlen(key), &trieValue)) { - return ReadUnaligned<T>(&trieValue); + return ReadUnaligned<T>(&trieValue); } else { return def; } @@ -126,9 +126,9 @@ public: } void Add(const char* key, const T& value) { - ui64 intValue = 0; - memcpy(&intValue, &value, sizeof(T)); - Builder.Add(key, strlen(key), intValue); + ui64 intValue = 0; + memcpy(&intValue, &value, sizeof(T)); + Builder.Add(key, strlen(key), intValue); #ifndef NDEBUG /* if (!IsSorted) { @@ -140,15 +140,15 @@ public: } void Add(const TString& s, const T& value) { - ui64 intValue = 0; - memcpy(&intValue, &value, sizeof(T)); - Builder.Add(s.data(), s.size(), intValue); + ui64 intValue = 0; + memcpy(&intValue, &value, sizeof(T)); + Builder.Add(s.data(), s.size(), intValue); } bool Get(const char* key, T* value) const { ui64 trieValue; if (Builder.Find(key, strlen(key), &trieValue)) { - *value = ReadUnaligned<T>(&trieValue); + *value = ReadUnaligned<T>(&trieValue); return true; } else { return false; @@ -158,7 +158,7 @@ public: T Get(const char* key, T def = (T)0) const { ui64 trieValue; if (Builder.Find(key, strlen(key), &trieValue)) { - return ReadUnaligned<T>(&trieValue); + return ReadUnaligned<T>(&trieValue); } else { return def; } |