Commit 822a2d93 authored by Quentin Khan's avatar Quentin Khan

FTic: corrected the operator+ to make it const

parent a635b026
......@@ -71,12 +71,13 @@ public:
return *this;
}
const FTic operator+(const FTic& other) {
start = start < other.start ? start : other.start;
end = end > other.end ? end : other.end;
cumulate += other.cumulate;
const FTic operator+(const FTic& other) const {
FTic res(*this);
res.start = start < other.start ? start : other.start;
res.end = end > other.end ? end : other.end;
res.cumulate += other.cumulate;
return FTic(*this);
return res;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment