comparison ops for MatchAndBuffer should be const

This commit is contained in:
Maxime Coste 2015-09-02 13:54:17 +01:00
parent 455cca19db
commit 64a5948e1c

View File

@ -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;