]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
TestFileStoreState.cc: use empty() to check for emptiness
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 13 Feb 2013 18:03:13 +0000 (19:03 +0100)
committerGreg Farnum <greg@inktank.com>
Thu, 14 Feb 2013 18:27:40 +0000 (10:27 -0800)
Use empty() instead of '!size()' to check for emptiness for
performance reasons.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/filestore/TestFileStoreState.cc

index e4a71620f0b51537c3b606fb89962790acf68ed6..631d5294d9a368e01c9389a632411935a9940f1b 100644 (file)
@@ -229,7 +229,7 @@ hobject_t *TestFileStoreState::coll_entry_t::remove_obj_at(int pos, int *key)
 hobject_t *TestFileStoreState::coll_entry_t::get_obj_at(int pos,
     bool remove, int *key)
 {
-  if (!m_objects.size()) {
+  if (m_objects.empty()) {
     dout(5) << "get_obj_at coll " << m_coll.to_str() << " pos " << pos
         << " in an empty collection" << dendl;
     return NULL;