comparison ops for MatchAndBuffer should be const
This commit is contained in:
parent
455cca19db
commit
64a5948e1c
|
@ -94,8 +94,8 @@ InsertCompletion complete_word(const Buffer& buffer, ByteCoord cursor_pos)
|
||||||
struct MatchAndBuffer {
|
struct MatchAndBuffer {
|
||||||
MatchAndBuffer(StringView m, const Buffer* b = nullptr) : match(m), buffer(b) {}
|
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) const { return match == other.match; }
|
||||||
bool operator<(const MatchAndBuffer& other) { return match < other.match; }
|
bool operator<(const MatchAndBuffer& other) const { return match < other.match; }
|
||||||
|
|
||||||
StringView match;
|
StringView match;
|
||||||
const Buffer* buffer;
|
const Buffer* buffer;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user