From 42417e2d03185dff523d95e205eb1b7238a03170 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Fri, 2 Jan 2015 15:46:59 +0100 Subject: [PATCH] KeyValueStore.cc: prefer !empty() over size() for emptiness check Signed-off-by: Danny Al-Gaaf --- src/os/KeyValueStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/KeyValueStore.cc b/src/os/KeyValueStore.cc index 95d5f57ff3a..cb177e69627 100644 --- a/src/os/KeyValueStore.cc +++ b/src/os/KeyValueStore.cc @@ -2257,7 +2257,7 @@ int KeyValueStore::collection_getattr(coll_t c, const char *name, r = -EINVAL; } - if (out.size()) { + if (!out.empty()) { bl.swap(out.begin()->second); r = bl.length(); } else {