Make update delta work a bit better. Still buggy though.

This commit is contained in:
Jacob Dufault 2017-05-11 00:20:00 -07:00
parent 74d67b0eb5
commit 57da6a81ab
2 changed files with 6 additions and 2 deletions

View File

@ -64,7 +64,9 @@ bool Position::operator==(const Position& that) const {
bool Position::operator!=(const Position& that) const { return !(*this == that); }
bool Position::operator<(const Position& that) const {
return line < that.line && column < that.column;
if (line < that.line)
return true;
return line == that.line && column < that.column;
}
Range::Range() {}

View File

@ -110,7 +110,9 @@ struct QueryFuncRef {
}
bool operator!=(const QueryFuncRef& that) const { return !(*this == that); }
bool operator<(const QueryFuncRef& that) const {
return id_ < that.id_ && loc.range.start < that.loc.range.start;
if (id_ < that.id_)
return true;
return id_ == that.id_ && loc.range.start < that.loc.range.start;
}
};