]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
src/client/SyntheticClient.cc: use !subdirs.empty() instead of size()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 12 Feb 2013 17:48:50 +0000 (18:48 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 15 Feb 2013 20:55:08 +0000 (21:55 +0100)
commitadb807c8aeb71d798efb0369daa1ff084c059f9f
treead4a817a21c1d2b50b20146f94a95de297c6a6cc
parent5c3e6570a35b00d18244a12274eb3edad5e332bd
src/client/SyntheticClient.cc: use !subdirs.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/SyntheticClient.cc:2706]: (performance) Possible
  inefficient checking for 'subdirs' emptiness

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