Bug 1227396: P11. Add IntervalSet::operator- operand. r=gerald

Also fix constness.
This commit is contained in:
Jean-Yves Avenard 2015-11-25 20:46:11 +11:00
parent c0593734db
commit 31b48c0641

View File

@ -401,7 +401,7 @@ public:
return intervals;
}
SelfType operator+ (const ElemType& aInterval)
SelfType operator+ (const ElemType& aInterval) const
{
SelfType intervals(*this);
intervals.Add(aInterval);
@ -442,7 +442,14 @@ public:
return *this;
}
SelfType operator- (const ElemType& aInterval)
SelfType operator- (const SelfType& aInterval) const
{
SelfType intervals(*this);
intervals -= aInterval;
return intervals;
}
SelfType operator- (const ElemType& aInterval) const
{
SelfType intervals(*this);
intervals -= aInterval;