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>
CLS_LOG(20, "%s is already in the index: %d", key.c_str(), r);
bufferlist::iterator b = raw_val.begin();
idata.decode(b);
- if (kvmap.size() != 0) {
+ if (!kvmap.empty()) {
bufferlist::iterator b = kvmap.begin()->second.begin();
next_idata.decode(b);
}
return r;
}
- if (kvs.size() > 0) {
+ if (!kvs.empty()) {
out_data.kdata.parse(kvs.begin()->first);
bufferlist::iterator b = kvs.begin()->second.begin();
out_data.decode(b);