Skip to content

Commit 5a70f0f

Browse files
committed
Use !empty() instead of length()
1 parent 7b4e59f commit 5a70f0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exif.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ IFEntry parseIFEntry_temp(const unsigned char *buf, const unsigned offs,
380380
}
381381
// and cut zero byte at the end, since we don't want that in the
382382
// std::string
383-
if (result.length() &&
383+
if (!result.empty() &&
384384
result.val_string()[result.val_string().length() - 1] == '\0') {
385385
result.val_string().resize(result.val_string().length() - 1);
386386
}

0 commit comments

Comments
 (0)