mirror of
https://github.com/ceph/ceph
synced 2025-02-12 05:18:35 +00:00
rgw/rgw_gc.cc: use !empty() instead of size() to check for emptiness
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 <danny.al-gaaf@bisect.de>
This commit is contained in:
parent
338e168015
commit
59f8c8d8ec
@ -217,7 +217,7 @@ int RGWGC::process(int index, int max_secs)
|
||||
} while (truncated);
|
||||
|
||||
done:
|
||||
if (remove_tags.size())
|
||||
if (!remove_tags.empty())
|
||||
remove(index, remove_tags);
|
||||
l.unlock(&store->gc_pool_ctx, obj_names[index]);
|
||||
delete ctx;
|
||||
|
Loading…
Reference in New Issue
Block a user