]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/osd_types.cc: use !p.tiers.empty() instead of size()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 5 Nov 2013 18:46:09 +0000 (19:46 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 7 Nov 2013 22:31:14 +0000 (23:31 +0100)
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>
src/osd/osd_types.cc

index 05b83c4af21bd86f6bf6d2c77f1b2d517d0dc21c..0cb3c0c64897ba0e7dcc1e62507de074a54e913b 100644 (file)
@@ -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;