[clang-tidy] use empty() instead of comparing

Found with readability-container-size-empty

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-02-20 23:10:39 -08:00 committed by Fabian Homborg
parent 33351d7657
commit a410dcb5c2

View File

@ -233,7 +233,7 @@ bool editable_line_t::undo() {
}
void editable_line_t::push_edit(edit_t &&edit) {
bool edit_does_nothing = edit.length == 0 && edit.replacement == L"";
bool edit_does_nothing = edit.length == 0 && edit.replacement.empty();
if (edit_does_nothing) return;
if (undo_history.edits_applied != undo_history.edits.size()) {
// After undoing some edits, the user is making a new edit;