]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds/MDSMap.h: use up.empty() instead of up.size()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 12 Feb 2013 16:41:04 +0000 (17:41 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 15 Feb 2013 20:55:08 +0000 (21:55 +0100)
commit49028367dbecd02a203d51bba4c60398d3830ca6
treef11e04daacc590acd007690281cd24a92dfb8eec
parent28bf6cbab6a34451a4008fd89f1b071fe65731c7
mds/MDSMap.h: use up.empty() instead of up.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().

warning from cppchecker was:
[src/mds/MDSMap.h:448]: (performance) Possible inefficient
  checking for 'up' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/mds/MDSMap.h