From 64a5948e1c0b482f11eac0c2179c0c6cc1b32a65 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 2 Sep 2015 13:54:17 +0100 Subject: [PATCH] comparison ops for MatchAndBuffer should be const --- src/insert_completer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/insert_completer.cc b/src/insert_completer.cc index cab78275..026adcf5 100644 --- a/src/insert_completer.cc +++ b/src/insert_completer.cc @@ -94,8 +94,8 @@ InsertCompletion complete_word(const Buffer& buffer, ByteCoord cursor_pos) struct MatchAndBuffer { MatchAndBuffer(StringView m, const Buffer* b = nullptr) : match(m), buffer(b) {} - bool operator==(const MatchAndBuffer& other) { return match == other.match; } - bool operator<(const MatchAndBuffer& other) { return match < other.match; } + bool operator==(const MatchAndBuffer& other) const { return match == other.match; } + bool operator<(const MatchAndBuffer& other) const { return match < other.match; } StringView match; const Buffer* buffer;