Use Long.compare in ChapterStartTimeComparator

This commit is contained in:
TacoTheDank 2020-05-29 14:47:58 -04:00
parent 002ba1753d
commit 14064cbe6f
1 changed files with 1 additions and 7 deletions

View File

@ -8,13 +8,7 @@ public class ChapterStartTimeComparator implements Comparator<Chapter> {
@Override @Override
public int compare(Chapter lhs, Chapter rhs) { public int compare(Chapter lhs, Chapter rhs) {
if (lhs.getStart() == rhs.getStart()) { return Long.compare(lhs.getStart(), rhs.getStart());
return 0;
} else if (lhs.getStart() < rhs.getStart()) {
return -1;
} else {
return 1;
}
} }
} }