From 4950a1b3b80ab3eb81abae31ec9bb79b06b363a9 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 13 Feb 2013 15:34:05 +0100 Subject: [PATCH] osdmaptool.cc: : use empty() instead of 'size() < 1' 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(). This way the code is more logical. Signed-off-by: Danny Al-Gaaf --- src/osdmaptool.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osdmaptool.cc b/src/osdmaptool.cc index 6df7eb038c3..66feeb94d81 100644 --- a/src/osdmaptool.cc +++ b/src/osdmaptool.cc @@ -120,7 +120,7 @@ int main(int argc, const char **argv) ++i; } } - if (args.size() < 1) { + if (args.empty()) { cerr << me << ": must specify osdmap filename" << std::endl; usage(); }