From f94f79793d27f34abb5320d52e760b3882665bfe Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 13 Feb 2013 14:59:53 +0100 Subject: [PATCH] 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 --- src/os/LFNIndex.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/LFNIndex.cc b/src/os/LFNIndex.cc index 1aae19b3a15e8..412100fe60420 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; -- 2.39.5