aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/containers/comptrie/comptrie_impl.h
diff options
context:
space:
mode:
authoronpopov <onpopov@yandex-team.ru>2022-02-10 16:50:38 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:38 +0300
commit8773f7661194d4c0bdb1e3937b2ff7ae01dd13f8 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/containers/comptrie/comptrie_impl.h
parent84a29dd4980d5b39615e453f289bd1a81213296d (diff)
downloadydb-8773f7661194d4c0bdb1e3937b2ff7ae01dd13f8.tar.gz
Restoring authorship annotation for <onpopov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/containers/comptrie/comptrie_impl.h')
-rw-r--r--library/cpp/containers/comptrie/comptrie_impl.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/containers/comptrie/comptrie_impl.h b/library/cpp/containers/comptrie/comptrie_impl.h
index 09a3554e2d..f41c38311a 100644
--- a/library/cpp/containers/comptrie/comptrie_impl.h
+++ b/library/cpp/containers/comptrie/comptrie_impl.h
@@ -30,17 +30,17 @@ namespace NCompactTrie {
return !(flags & (MT_FINAL | MT_NEXT));
}
- static inline void TraverseEpsilon(const char*& datapos) {
- const char flags = *datapos;
- if (!IsEpsilonLink(flags)) {
- return;
- }
- const size_t offsetlength = flags & MT_SIZEMASK;
- const size_t offset = UnpackOffset(datapos + 1, offsetlength);
+ static inline void TraverseEpsilon(const char*& datapos) {
+ const char flags = *datapos;
+ if (!IsEpsilonLink(flags)) {
+ return;
+ }
+ const size_t offsetlength = flags & MT_SIZEMASK;
+ const size_t offset = UnpackOffset(datapos + 1, offsetlength);
Y_ASSERT(offset);
- datapos += offset;
- }
-
+ datapos += offset;
+ }
+
static inline size_t LeftOffsetLen(const char flags) {
return (flags >> MT_LEFTSHIFT) & MT_SIZEMASK;
}
@@ -176,12 +176,12 @@ namespace NCompactTrie {
return 0;
}
- // Auxiliary function: consumes one (multibyte) symbol from the input.
- // Advances the data pointer to the root of the subtrie beginning after the symbol,
- // zeroes it if this subtrie is empty.
- // If there is a value associated with the symbol, makes the value pointer point to it,
+ // Auxiliary function: consumes one (multibyte) symbol from the input.
+ // Advances the data pointer to the root of the subtrie beginning after the symbol,
+ // zeroes it if this subtrie is empty.
+ // If there is a value associated with the symbol, makes the value pointer point to it,
// otherwise sets it to nullptr.
- // Returns true if the symbol was succesfully found in the trie, false otherwise.
+ // Returns true if the symbol was succesfully found in the trie, false otherwise.
template <typename TSymbol, class TPacker>
Y_FORCE_INLINE bool Advance(const char*& datapos, const char* const dataend, const char*& value,
TSymbol label, TPacker packer) {