diff options
author | eeight <[email protected]> | 2022-02-10 16:46:19 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:19 +0300 |
commit | bd085aee9b4f7a0bee302ce687964ffb7098f986 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/containers/comptrie/chunked_helpers_trie.h | |
parent | 475c0a46f28166e83fd263badc7546377cddcabe (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 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 02e998607ca..cfa35f5ba2a 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; } |