Fix formatting of foreach function.

GitOrigin-RevId: de355b5e5877428c75a167f4bff1e2514b5e0577
This commit is contained in:
levlam 2018-07-17 23:08:38 +03:00
parent b0dfc088ae
commit b0a2564b97
4 changed files with 6 additions and 5 deletions

View File

@ -55,7 +55,7 @@ DerivePointerAlignment: true
DisableFormat: false DisableFormat: false
ExperimentalAutoDetectBinPacking: false ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true FixNamespaceComments: true
# ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] ForEachMacros: [ Q_FOREACH_THIS_LIST_MUST_BE_NON_EMPTY ]
IndentCaseLabels: true IndentCaseLabels: true
IndentPPDirectives: None IndentPPDirectives: None
IndentWidth: 2 IndentWidth: 2

View File

@ -11,6 +11,7 @@
#include <unordered_map> #include <unordered_map>
namespace td { namespace td {
class SeqKeyValue { class SeqKeyValue {
public: public:
using SeqNo = uint64; using SeqNo = uint64;
@ -51,7 +52,7 @@ class SeqKeyValue {
} }
template <class F> template <class F>
void foreach (const F &f) { void foreach(const F &f) {
for (auto &it : map_) { for (auto &it : map_) {
f(it.first, it.second); f(it.first, it.second);
} }
@ -75,4 +76,5 @@ class SeqKeyValue {
return ++current_id_; return ++current_id_;
} }
}; };
} // namespace td } // namespace td

View File

@ -82,9 +82,6 @@ class SqliteKeyValue {
void close() { void close() {
clear(); clear();
} }
void close_silent() {
clear();
}
static Status destroy(Slice name) { static Status destroy(Slice name) {
return SqliteDb::destroy(name); return SqliteDb::destroy(name);
} }

View File

@ -15,6 +15,7 @@
#include <utility> #include <utility>
namespace td { namespace td {
class TsSeqKeyValue { class TsSeqKeyValue {
public: public:
using SeqNo = SeqKeyValue::SeqNo; using SeqNo = SeqKeyValue::SeqNo;
@ -68,4 +69,5 @@ class TsSeqKeyValue {
RwMutex rw_mutex_; RwMutex rw_mutex_;
SeqKeyValue kv_; SeqKeyValue kv_;
}; };
} // namespace td } // namespace td