File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ class MPTime {
6565
6666 explicit operator CDouble () const { return myVal; }
6767 explicit operator MPString () const { return timeToString (*this ); }
68- MPTime & operator -();
68+ MPTime operator -();
6969 MPTime &operator +=(MPTime a);
7070 MPTime &operator -=(MPTime a);
7171 bool operator ==(MPTime a) const ;
@@ -153,10 +153,9 @@ inline MPTime operator-(MPTime a, CDouble b) { return MPTime(a) - MPTime(b); }
153153
154154inline MPTime operator -(CDouble a, MPTime b) { return MPTime (a) - MPTime (b); }
155155
156- inline MPTime & MPTime::operator -() {
156+ inline MPTime MPTime::operator -() {
157157 assert (!this ->isMinusInfinity ());
158- myVal = -myVal;
159- return *this ;
158+ return MPTime (-myVal);
160159}
161160
162161inline MPTime operator *(MPTime a, MPTime b) {
You can’t perform that action at this time.
0 commit comments