From a410dcb5c2703df0394f2b22683e87275c499f89 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 20 Feb 2020 23:10:39 -0800 Subject: [PATCH] [clang-tidy] use empty() instead of comparing Found with readability-container-size-empty Signed-off-by: Rosen Penev --- src/reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reader.cpp b/src/reader.cpp index b06abb0c5..8757eeff8 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -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;