Skip to content

Commit 5e2f4e8

Browse files
committed
osd: use empty() instead of length()
for std::string Signed-off-by: Ronen Friedman <[email protected]>
1 parent ec1cd79 commit 5e2f4e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/osd/osd_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ inline bool operator!=(const object_locator_t& l, const object_locator_t& r) {
315315
inline std::ostream& operator<<(std::ostream& out, const object_locator_t& loc)
316316
{
317317
out << "@" << loc.pool;
318-
if (loc.nspace.length())
318+
if (!loc.nspace.empty())
319319
out << ";" << loc.nspace;
320-
if (loc.key.length())
320+
if (!loc.key.empty())
321321
out << ":" << loc.key;
322322
return out;
323323
}

0 commit comments

Comments
 (0)