From: Danny Al-Gaaf Date: Wed, 13 Feb 2013 13:59:53 +0000 (+0100) Subject: LFNIndex.cc: use !holes.empty() instead of 'size() > 0' X-Git-Tag: v0.58~66^2~47 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f94f79793d27f34abb5320d52e760b3882665bfe;p=ceph.git LFNIndex.cc: use !holes.empty() instead of 'size() > 0' Use empty() since it should be prefered as it has, following the standard, a constant time complexity regardless of the containter type. The same is not guaranteed for size(). Signed-off-by: Danny Al-Gaaf --- diff --git a/src/os/LFNIndex.cc b/src/os/LFNIndex.cc index 1aae19b3a15..412100fe604 100644 --- a/src/os/LFNIndex.cc +++ b/src/os/LFNIndex.cc @@ -235,7 +235,7 @@ int LFNIndex::remove_objects(const vector &dir, candidate->second.second)); candidate++; } - if (holes.size() > 0) + if (!holes.empty()) clean_chains.insert(lfn_get_short_name(to_clean->second, 0)); } return 0;