aboutsummaryrefslogtreecommitdiffstats
path: root/util/ysaveload.h
diff options
context:
space:
mode:
authormowgli <mowgli@yandex-team.ru>2022-02-10 16:49:25 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:25 +0300
commit56c39b3cf908e7202b1f7551a1653681e8015607 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/ysaveload.h
parent89afbbe4ca0e02e386dd4df08f7945f190dc1b84 (diff)
downloadydb-56c39b3cf908e7202b1f7551a1653681e8015607.tar.gz
Restoring authorship annotation for <mowgli@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/ysaveload.h')
-rw-r--r--util/ysaveload.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/util/ysaveload.h b/util/ysaveload.h
index afde429f2f..02efb4049b 100644
--- a/util/ysaveload.h
+++ b/util/ysaveload.h
@@ -455,21 +455,21 @@ public:
template <class TSetOrMap, class TValue>
class TSetSerializerInserterBase {
-public:
+public:
inline TSetSerializerInserterBase(TSetOrMap& s)
- : S_(s)
- {
- S_.clear();
- }
-
- inline void Insert(const TValue& v) {
- S_.insert(v);
- }
-
+ : S_(s)
+ {
+ S_.clear();
+ }
+
+ inline void Insert(const TValue& v) {
+ S_.insert(v);
+ }
+
protected:
TSetOrMap& S_;
-};
-
+};
+
template <class TSetOrMap, class TValue, bool sorted>
class TSetSerializerInserter: public TSetSerializerInserterBase<TSetOrMap, TValue> {
using TBase = TSetSerializerInserterBase<TSetOrMap, TValue>;
@@ -486,22 +486,22 @@ template <class TSetType, class TValue>
class TSetSerializerInserter<TSetType, TValue, true>: public TSetSerializerInserterBase<TSetType, TValue> {
using TBase = TSetSerializerInserterBase<TSetType, TValue>;
-public:
+public:
inline TSetSerializerInserter(TSetType& s, size_t cnt)
: TBase(s)
- {
+ {
Y_UNUSED(cnt);
P_ = this->S_.begin();
- }
+ }
- inline void Insert(const TValue& v) {
+ inline void Insert(const TValue& v) {
P_ = this->S_.insert(P_, v);
- }
-
-private:
+ }
+
+private:
typename TSetType::iterator P_;
-};
-
+};
+
template <class T1, class T2, class T3, class T4, class T5, class TValue>
class TSetSerializerInserter<THashMap<T1, T2, T3, T4, T5>, TValue, false>: public TSetSerializerInserterBase<THashMap<T1, T2, T3, T4, T5>, TValue> {
using TMapType = THashMap<T1, T2, T3, T4, T5>;
@@ -605,17 +605,17 @@ template <class T1, class T2, class T3, class T4, class T5>
class TSerializer<THashMultiMap<T1, T2, T3, T4, T5>>: public TMapSerializer<THashMultiMap<T1, T2, T3, T4, T5>, false> {
};
-template <class K, class C, class A>
+template <class K, class C, class A>
class TSerializer<TSet<K, C, A>>: public TSetSerializer<TSet<K, C, A>, true> {
};
-
+
template <class K, class C, class A>
class TSerializer<std::set<K, C, A>>: public TSetSerializer<std::set<K, C, A>, true> {
};
template <class T1, class T2, class T3, class T4>
class TSerializer<THashSet<T1, T2, T3, T4>>: public TSetSerializer<THashSet<T1, T2, T3, T4>, false> {
-};
+};
template <class T1, class T2>
class TSerializer<TQueue<T1, T2>> {