1
0
mirror of https://github.com/ceph/ceph synced 2025-02-12 05:18:35 +00:00

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 <danny.al-gaaf@bisect.de>
This commit is contained in:
Danny Al-Gaaf 2013-02-13 15:34:05 +01:00 committed by Greg Farnum
parent fb6561e742
commit 4950a1b3b8

View File

@ -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();
}