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>
if (ret < 0)
return ret;
- if (!objr.refs.size()) {// shouldn't happen!
+ if (objr.refs.empty()) {// shouldn't happen!
CLS_LOG(0, "ERROR: cls_rc_refcount_put() was called without any references!\n");
return -EINVAL;
}
objr.refs.erase(iter);
- if (!objr.refs.size()) {
+ if (objr.refs.empty()) {
return cls_cxx_remove(hctx);
}