]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cls/lock/cls_lock.cc: use !lockers.empty() instead of size() 62/head
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 12 Feb 2013 17:51:51 +0000 (18:51 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 15 Feb 2013 20:55:09 +0000 (21:55 +0100)
commit29b44666d5d15e8087ff4626483751222784c400
tree8c5afb23edbdd7f42c4137f2f8999f8d0dcb6359
parentadb807c8aeb71d798efb0369daa1ff084c059f9f
cls/lock/cls_lock.cc: use !lockers.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/cls/lock/cls_lock.cc:209]: (performance) Possible inefficient
  checking for 'lockers' emptiness.

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