]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
NewStore.cc: prefer --/++operator for non-primitive iterators
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 9 Sep 2015 14:50:38 +0000 (16:50 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 10 Sep 2015 17:29:21 +0000 (19:29 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/os/newstore/NewStore.cc

index 953dcd22d58643d3737b263c09ca495b5f4ad818..2288894042a509f6b6f0576d93178f3cc4cedf77 100644 (file)
@@ -463,7 +463,7 @@ int NewStore::OnodeHashLRU::trim(int max)
   int num = onode_map.size() - max;
   lru_list_t::iterator p = lru.end();
   if (num)
-    p--;
+    --p;
   while (num > 0) {
     Onode *o = &*p;
     int refs = o->nref.read();
@@ -2487,7 +2487,7 @@ void NewStore::_kv_sync_thread()
       if (!g_conf->newstore_sync_submit_transaction) {
        for (std::deque<TransContext *>::iterator it = kv_committing.begin();
             it != kv_committing.end();
-            it++) {
+            ++it) {
          db->submit_transaction((*it)->t);
        }
       }
@@ -2497,7 +2497,7 @@ void NewStore::_kv_sync_thread()
       KeyValueDB::Transaction txc_cleanup_sync = db->get_transaction();
       for (std::deque<TransContext *>::iterator it = wal_cleaning.begin();
            it != wal_cleaning.end();
-           it++) {
+           ++it) {
        wal_transaction_t& wt =*(*it)->wal_txn;
        // cleanup the data in overlays
        for (list<wal_op_t>::iterator p = wt.ops.begin(); p != wt.ops.end(); ++p) {