Skip to content

Commit

Permalink
Update compare to take FromSourceLocations
Browse files Browse the repository at this point in the history
  • Loading branch information
Chase Coalwell committed Apr 18, 2022
1 parent c99fcaf commit bb54034
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ default SourceLocation getSourceLocation() {
}

/**
* Compares two SourceLocations.
* Compares two FromSourceLocations.
*
* @param s1 the first SourceLocation to compare.
* @param s2 the second SourceLocation to compare.
* @param s1 the first FromSourceLocation to compare.
* @param s2 the second FromSourceLocation to compare.
* @return the value 0 if s1 == s2; a value less than 0 if s1 < s2; and a value greater than 0 if s1 > s2.
*/
static int compare(SourceLocation s1, SourceLocation s2) {
return s1.compareTo(s2);
static int compare(FromSourceLocation s1, FromSourceLocation s2) {
return s1.getSourceLocation().compareTo(s2.getSourceLocation());
}
}

0 comments on commit bb54034

Please sign in to comment.