]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
CInode.h: use !old_inodes.empty() instead of size()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 13 Feb 2013 12:52:44 +0000 (13:52 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 13 Feb 2013 12:59:18 +0000 (13:59 +0100)
commit6b8458d7a7de7ccd780b7dbf7bd1de13ef9ee726
tree5eb17eadcecd23cbfde6f1cfc7f4523b3d3f4d01
parenta3970e56269a26016b99aed53af045df45a01109
CInode.h: use !old_inodes.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().

warning from cppcheck was:
[src/mds/journal.cc:470]: (performance) Possible inefficient
  checking for 'old_inodes' emptiness.

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