summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-02-13 19:15:18 +0100
committerGreg Farnum <greg@inktank.com>2013-02-14 10:27:40 -0800
commitab1166cd9cc140b0ea63139af55ad809e9d9b4ab (patch)
tree097896cf4c6c572fbc4b2743f35481dec438e132 /src/tools
parent82023784762c0b11e9b30582122962fe0be5171e (diff)
downloadceph-ab1166cd9cc140b0ea63139af55ad809e9d9b4ab.tar.gz
rest_bench.cc: use empty() to check for emptiness
Use empty() instead of 'size() == 0' or 'size() < 1' to check for emptiness for performance reasons. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/rest_bench.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/rest_bench.cc b/src/tools/rest_bench.cc
index 8e8649d213e..9813ba3e12d 100644
--- a/src/tools/rest_bench.cc
+++ b/src/tools/rest_bench.cc
@@ -246,7 +246,7 @@ class RESTDispatcher {
}
void _dump_queue() {
deque<req_context *>::iterator iter;
- if (dispatcher->m_req_queue.size() == 0) {
+ if (dispatcher->m_req_queue.empty()) {
generic_dout(20) << "DispatcherWQ: empty" << dendl;
return;
}
@@ -735,7 +735,7 @@ int main(int argc, const char **argv)
cerr << "rest-bench: bucket not specified" << std::endl;
usage_exit();
}
- if (args.size() < 1)
+ if (args.empty())
usage_exit();
int operation = 0;
const char *prefix = NULL;