Use !empty() instead of 'size()' to check for emptiness for
performance reasons.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
to_get.insert(key);
map<string, bufferlist> got;
db->get_xattrs(hoid, to_get, &got);
- if (got.size()) {
+ if (!got.empty()) {
*value = string(got.begin()->second.c_str(),
got.begin()->second.length());
return 1;
to_get.insert(key);
map<string, bufferlist> got;
db->get_values(hoid, to_get, &got);
- if (got.size()) {
+ if (!got.empty()) {
*value = string(got.begin()->second.c_str(),
got.begin()->second.length());
return 1;