forked from jasder/antlr
Merge pull request #28 from nburles/fix-intervalset-comparisons
Fixes comparisons of IntervalSets
This commit is contained in:
commit
8bbdbe0371
|
@ -363,7 +363,7 @@ bool IntervalSet::operator == (const IntervalSet &other) const {
|
||||||
if (_intervals.empty() && other._intervals.empty())
|
if (_intervals.empty() && other._intervals.empty())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (_intervals.empty() || other._intervals.empty())
|
if (_intervals.size() != other._intervals.size())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return std::equal(_intervals.begin(), _intervals.end(), other._intervals.begin());
|
return std::equal(_intervals.begin(), _intervals.end(), other._intervals.begin());
|
||||||
|
|
Loading…
Reference in New Issue