mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1203350 - Unify arithmetic operators in TimeStamp; r=froydnj
This commit is contained in:
parent
f1b5ccb184
commit
79d3dd88b7
@ -491,13 +491,15 @@ public:
|
||||
|
||||
TimeStamp operator+(const TimeDuration& aOther) const
|
||||
{
|
||||
MOZ_ASSERT(!IsNull(), "Cannot compute with a null value");
|
||||
return TimeStamp(mValue + aOther.mValue);
|
||||
TimeStamp result = *this;
|
||||
result += aOther;
|
||||
return result;
|
||||
}
|
||||
TimeStamp operator-(const TimeDuration& aOther) const
|
||||
{
|
||||
MOZ_ASSERT(!IsNull(), "Cannot compute with a null value");
|
||||
return TimeStamp(mValue - aOther.mValue);
|
||||
TimeStamp result = *this;
|
||||
result -= aOther;
|
||||
return result;
|
||||
}
|
||||
TimeStamp& operator+=(const TimeDuration& aOther)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user