]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client/Client.cc: use empty() instead of size()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 12 Feb 2013 17:44:04 +0000 (18:44 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 15 Feb 2013 20:55:08 +0000 (21:55 +0100)
commit5c3e6570a35b00d18244a12274eb3edad5e332bd
tree487838fadf4cac8f5ddd1451b4138c384c6d627c
parent49028367dbecd02a203d51bba4c60398d3830ca6
client/Client.cc: use 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 cppchecker was:
[src/client/Client.cc:3649]: (performance) Possible inefficient
  checking for 'mds_sessions' emptiness.
[src/client/Client.cc:7489]: (performance) Possible inefficient
  checking for 'osds' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/client/Client.cc