]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crushtool.cc: use !empty() instead of 'size() > 0' to check for emptiness
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 13 Feb 2013 16:33:12 +0000 (17:33 +0100)
committerGreg Farnum <greg@inktank.com>
Thu, 14 Feb 2013 18:27:38 +0000 (10:27 -0800)
commit30fe1077a8b5d07c1970c14990c8163cb11733b2
tree7a48310736ed62cae520e30a55203debe72293b9
parentf4cae0005268d737890ec7db63c09caf138ec625
crushtool.cc: use !empty() instead of 'size() > 0' 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>
src/crushtool.cc