diff --git a/.clang-format b/.clang-format index e169061ba..3df452852 100644 --- a/.clang-format +++ b/.clang-format @@ -55,7 +55,7 @@ DerivePointerAlignment: true DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true -# ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] +ForEachMacros: [ Q_FOREACH_THIS_LIST_MUST_BE_NON_EMPTY ] IndentCaseLabels: true IndentPPDirectives: None IndentWidth: 2 diff --git a/tddb/td/db/SeqKeyValue.h b/tddb/td/db/SeqKeyValue.h index ec6f2b99b..90c8935ef 100644 --- a/tddb/td/db/SeqKeyValue.h +++ b/tddb/td/db/SeqKeyValue.h @@ -11,6 +11,7 @@ #include namespace td { + class SeqKeyValue { public: using SeqNo = uint64; @@ -51,7 +52,7 @@ class SeqKeyValue { } template - void foreach (const F &f) { + void foreach(const F &f) { for (auto &it : map_) { f(it.first, it.second); } @@ -75,4 +76,5 @@ class SeqKeyValue { return ++current_id_; } }; + } // namespace td diff --git a/tddb/td/db/SqliteKeyValue.h b/tddb/td/db/SqliteKeyValue.h index b03fcd344..23a2ec620 100644 --- a/tddb/td/db/SqliteKeyValue.h +++ b/tddb/td/db/SqliteKeyValue.h @@ -82,9 +82,6 @@ class SqliteKeyValue { void close() { clear(); } - void close_silent() { - clear(); - } static Status destroy(Slice name) { return SqliteDb::destroy(name); } diff --git a/tddb/td/db/TsSeqKeyValue.h b/tddb/td/db/TsSeqKeyValue.h index 8d94d7967..c2a3fa5d9 100644 --- a/tddb/td/db/TsSeqKeyValue.h +++ b/tddb/td/db/TsSeqKeyValue.h @@ -15,6 +15,7 @@ #include namespace td { + class TsSeqKeyValue { public: using SeqNo = SeqKeyValue::SeqNo; @@ -68,4 +69,5 @@ class TsSeqKeyValue { RwMutex rw_mutex_; SeqKeyValue kv_; }; + } // namespace td