From: Danny Al-Gaaf Date: Tue, 5 Nov 2013 18:46:09 +0000 (+0100) Subject: osd/osd_types.cc: use !p.tiers.empty() instead of size() X-Git-Tag: v0.74~90^2~1^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=36ae9eb3214acee1c43e8a560ab20647197b5a47;p=ceph.git osd/osd_types.cc: use !p.tiers.empty() instead of size() 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/osd/osd_types.cc b/src/osd/osd_types.cc index 05b83c4af21..0cb3c0c6489 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -1062,7 +1062,7 @@ ostream& operator<<(ostream& out, const pg_pool_t& p) out << " max_bytes " << p.quota_max_bytes; if (p.quota_max_objects) out << " max_objects " << p.quota_max_objects; - if (p.tiers.size()) + if (!p.tiers.empty()) out << " tiers " << p.tiers; if (p.is_tier()) out << " tier_of " << p.tier_of;