diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-03-16 23:08:10 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-03-16 23:34:02 +0000 |
| commit | e44f95820ee182460bee2e7569ab4ecb1d444112 (patch) | |
| tree | eaf60c648066fef5b57512dc6ccc47d8095717e4 /src/buffer.cc | |
| parent | 5f7464d90d0bfe641dd2c7bbbca6e78d92d9d818 (diff) | |
Fixes some clang-tidy warning and add a few missing meta.hh include
Diffstat (limited to 'src/buffer.cc')
| -rw-r--r-- | src/buffer.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buffer.cc b/src/buffer.cc index dac1e19c..04c53083 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -317,7 +317,7 @@ bool Buffer::undo(size_t count) noexcept if (not m_history_cursor->parent) return false; - while (count-- and m_history_cursor->parent) + while (count-- != 0 and m_history_cursor->parent) { for (const Modification& modification : m_history_cursor->undo_group | reverse()) apply_modification(modification.inverse()); @@ -335,7 +335,7 @@ bool Buffer::redo(size_t count) noexcept kak_assert(m_current_undo_group.empty()); - while (count-- and m_history_cursor->redo_child) + while (count-- != 0 and m_history_cursor->redo_child) { m_history_cursor = m_history_cursor->redo_child.get(); @@ -671,7 +671,7 @@ BufferCoord Buffer::char_prev(BufferCoord coord) const { kak_assert(is_valid(coord)); if (is_end(coord)) - return coord = {(int)m_lines.size()-1, m_lines.back().length() - 1}; + return {(int)m_lines.size()-1, m_lines.back().length() - 1}; else if (coord.column == 0) { if (coord.line > 0) |
