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().
warning from cppchecker was:
[src/mds/CDentry.h:234]: (performance) Possible inefficient
checking for 'projected' emptiness.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
bool is_projected() { return projected.size(); }
linkage_t *get_projected_linkage() {
- if (projected.size())
+ if (!projected.empty())
return &projected.back();
return &linkage;
}