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().
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
it != images.end(); ++it) {
names.push_back(it->first);
}
- if (images.size()) {
+ if (!images.empty()) {
last_read = images.rbegin()->first;
}
r = images.size();
return r;
}
omap_values.insert(outbl.begin(), outbl.end());
- if (outbl.size() > 0)
+ if (!outbl.empty())
last_read = outbl.rbegin()->first;
} while (r == MAX_READ);
librados::ObjectWriteOperation op;
op.create(true);
op.write_full(databl);
- if (omap_values.size())
+ if (!omap_values.empty())
op.omap_set(omap_values);
r = io_ctx.operate(dst_oid, &op);
if (r < 0) {