Skip to content

Commit

Permalink
refactor: CheckIntersection
Browse files Browse the repository at this point in the history
  • Loading branch information
PokIsemaine committed Jul 1, 2024
1 parent 64a7c64 commit 00b6c31
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cluster/cluster_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ struct SlotRange {
bool Contain(int slot) const { return IsValid() && slot >= start && slot <= end; }

bool CheckIntersection(const SlotRange &rhs) const {
if (!IsValid() || !rhs.IsValid() || end < rhs.start || rhs.end < start) return false;
return true;
return IsValid() && rhs.IsValid() && !(end < rhs.start || rhs.end < start);
}
std::string String() const {
if (!IsValid()) return "empty";
Expand Down

0 comments on commit 00b6c31

Please sign in to comment.