aboutsummaryrefslogtreecommitdiffstats
path: root/util/draft/enum.h
diff options
context:
space:
mode:
authormihaild <mihaild@yandex-team.ru>2022-02-10 16:46:59 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:59 +0300
commit246417ad6168d3f7ab4a0cf1c79ba4259f7c45ae (patch)
tree2a65611ade91c8ae2f55647107c1a11ea743abd5 /util/draft/enum.h
parent5598c5e7bc7619bd51d87fea7b880b7788ad0b47 (diff)
downloadydb-246417ad6168d3f7ab4a0cf1c79ba4259f7c45ae.tar.gz
Restoring authorship annotation for <mihaild@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/draft/enum.h')
-rw-r--r--util/draft/enum.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/util/draft/enum.h b/util/draft/enum.h
index 18002b7df2..5c3d202361 100644
--- a/util/draft/enum.h
+++ b/util/draft/enum.h
@@ -6,7 +6,7 @@
#include <util/stream/str.h>
#include <util/string/cast.h>
#include <util/string/split.h>
-#include <utility>
+#include <utility>
class TEnumNotFoundException: public yexception {
};
@@ -20,7 +20,7 @@ class TEnumNotFoundException: public yexception {
#define PrintEnumItems(entries) PrintEnumItemsImpl(entries, Y_ARRAY_SIZE(entries))
template <class K1, class K2, class V>
-const V* FindEnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t arraySize) {
+const V* FindEnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t arraySize) {
for (size_t i = 0; i < arraySize; i++)
if (entries[i].first == key)
return &entries[i].second;
@@ -29,7 +29,7 @@ const V* FindEnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t
// special version for const char*
template <class V>
-const V* FindEnumFromStringImpl(const char* key, const std::pair<const char*, V>* entries, size_t arraySize) {
+const V* FindEnumFromStringImpl(const char* key, const std::pair<const char*, V>* entries, size_t arraySize) {
for (size_t i = 0; i < arraySize; i++)
if (entries[i].first && key && !strcmp(entries[i].first, key))
return &entries[i].second;
@@ -56,7 +56,7 @@ TString PrintEnumItemsImpl(const std::pair<const char*, V>* entries, size_t arra
}
template <class K1, class K2, class V>
-const V* EnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t arraySize) {
+const V* EnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t arraySize) {
const V* res = FindEnumFromStringImpl(key, entries, arraySize);
if (res)
return res;
@@ -65,7 +65,7 @@ const V* EnumFromStringImpl(K1 key, const std::pair<K2, V>* entries, size_t arra
}
template <class K, class V>
-const K* EnumToStringImpl(V value, const std::pair<K, V>* entries, size_t arraySize) {
+const K* EnumToStringImpl(V value, const std::pair<K, V>* entries, size_t arraySize) {
for (size_t i = 0; i < arraySize; i++)
if (entries[i].second == value)
return &entries[i].first;
@@ -105,7 +105,7 @@ inline void SetEnumFlags(const std::pair<const char*, E> (&str2Enum)[N], TString
}
template <class E, size_t B>
-inline void SetEnumFlags(const std::pair<const char*, E>* str2Enum, TStringBuf optSpec,
+inline void SetEnumFlags(const std::pair<const char*, E>* str2Enum, TStringBuf optSpec,
std::bitset<B>& flags, const size_t size,
bool allIfEmpty = true) {
if (optSpec.empty()) {