From: Danny Al-Gaaf Date: Mon, 18 Mar 2013 13:39:09 +0000 (+0100) Subject: test/filestore/workload_generator.cc: prefer prefix ++operator for iterators X-Git-Tag: v0.60~44^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ffaf286625bfeb8b03968021205c863dbb73333c;p=ceph.git test/filestore/workload_generator.cc: prefer prefix ++operator for iterators Prefer prefix ++operator for iterator. Move the iterator declaration into the for-loop header since the iterator isn't used outside the loop. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/test/filestore/workload_generator.cc b/src/test/filestore/workload_generator.cc index 5d7b8139da4e..496379d7ad1b 100644 --- a/src/test/filestore/workload_generator.cc +++ b/src/test/filestore/workload_generator.cc @@ -349,8 +349,7 @@ void WorkloadGenerator::do_destroy_collection(ObjectStore::Transaction *t, dout(2) << __func__ << " coll " << entry->m_coll << " (" << ls.size() << " objects)" << dendl; - vector::iterator it; - for (it = ls.begin(); it < ls.end(); it++) { + for (vector::iterator it = ls.begin(); it < ls.end(); ++it) { t->remove(entry->m_coll, *it); }