aboutsummaryrefslogtreecommitdiffstats
path: root/util/draft/enum.h
diff options
context:
space:
mode:
authordiver <diver@yandex-team.ru>2022-02-10 16:48:07 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:07 +0300
commit7629e1f9ef7f9d2a3c345c97e6a4e5a4b32ee786 (patch)
treec3371bfa47641a52244267b63009d16e4e7054ff /util/draft/enum.h
parentcc573d2716c99ba22afc98753971cd97fd5283e0 (diff)
downloadydb-7629e1f9ef7f9d2a3c345c97e6a4e5a4b32ee786.tar.gz
Restoring authorship annotation for <diver@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/draft/enum.h')
-rw-r--r--util/draft/enum.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/util/draft/enum.h b/util/draft/enum.h
index 18002b7df2..82e4de14fd 100644
--- a/util/draft/enum.h
+++ b/util/draft/enum.h
@@ -119,18 +119,18 @@ inline void SetEnumFlags(const std::pair<const char*, E>* str2Enum, TStringBuf o
}
}
-// for enums generated with GENERATE_ENUM_SERIALIZATION
-template <class E, size_t B>
-inline void SetEnumFlags(TStringBuf optSpec, std::bitset<B>& flags, bool allIfEmpty = true) {
- if (optSpec.empty()) {
+// for enums generated with GENERATE_ENUM_SERIALIZATION
+template <class E, size_t B>
+inline void SetEnumFlags(TStringBuf optSpec, std::bitset<B>& flags, bool allIfEmpty = true) {
+ if (optSpec.empty()) {
SetEnumFlagsForEmptySpec(flags, allIfEmpty);
- } else {
- flags.reset();
+ } else {
+ flags.reset();
for (const auto& it : StringSplitter(optSpec).Split(',')) {
- E e;
+ E e;
if (!TryFromString(it.Token(), e))
ythrow yexception() << "Unknown enum value '" << it.Token() << "'";
- flags.set((size_t)e);
- }
- }
-}
+ flags.set((size_t)e);
+ }
+ }
+}