diff options
author | diver <diver@yandex-team.ru> | 2022-02-10 16:48:07 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:07 +0300 |
commit | 7629e1f9ef7f9d2a3c345c97e6a4e5a4b32ee786 (patch) | |
tree | c3371bfa47641a52244267b63009d16e4e7054ff /util/draft/enum.h | |
parent | cc573d2716c99ba22afc98753971cd97fd5283e0 (diff) | |
download | ydb-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.h | 22 |
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); + } + } +} |