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:
Danny Al-Gaaf 2013-02-13 15:57:45 +01:00 committed by Greg Farnum
parent 338e168015
commit 59f8c8d8ec

View File

@ -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;