]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
src/osd/PG.h: use empty() instead of size()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 7 Feb 2013 19:16:46 +0000 (20:16 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 11 Feb 2013 10:38:02 +0000 (11:38 +0100)
commit1f0fd504901c31aa6a82c18e7b12c93e7279909d
treeae589809df57b395e55df67b0e632e29ec02c38f
parent76798eabea4d166ef8abd943b78769656a081531
src/osd/PG.h: use empty() instead of size()

Fix warning for usage of objects.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:
[osd/PG.h:599]: (performance) Possible inefficient checking for
  'objects' emptiness.

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