Skip to content

Commit 4322d03

Browse files
committed
Debugged Interval::operator!=
1 parent fe6a3e7 commit 4322d03

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

sbg/interval.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,18 @@ bool operator==(const Interval& lhs, const Interval& rhs)
9393
bool operator!=(const Interval& lhs, const Interval& rhs)
9494
{
9595
if (lhs.begin() != rhs.begin()) {
96-
return false;
96+
return true;
9797
}
9898

9999
if (lhs.step() != rhs.step()) {
100-
return false;
100+
return true;
101101
}
102102

103103
if (lhs.end() != rhs.end()) {
104-
return false;
104+
return true;
105105
}
106106

107-
return true;
107+
return false;
108108
}
109109

110110
bool Interval::operator<(const Interval& other) const

sbg/map.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ Set Map::lessImage(const Map& other) const
166166
}
167167

168168
Set result = detail::MapDetail::lessImage(_law, other._law);
169-
result = std::move(result).intersection(cap_dom);
170-
return result;
169+
return result.intersection(cap_dom);
171170
}
172171

173172
Map Map::minAdj(const Map& other) const

sbg/multidim_inter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,10 @@ MaybeMDI MultiDimInter::compact(const MultiDimInter& other) const
224224
for (; j < arity(); ++j) {
225225
Interval jth_this = operator[](j);
226226
Interval jth_other = other[j];
227-
MaybeInterval jth_compact = jth_this.compact(jth_other);
228227
if (jth_this == jth_other) {
229228
result.pushBack(jth_this);
230229
} else {
230+
MaybeInterval jth_compact = jth_this.compact(jth_other);
231231
if (jth_compact) {
232232
result.pushBack(jth_compact.value());
233233
++j;

0 commit comments

Comments
 (0)