mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-06-01 00:09:57 +00:00
Add -=, - and * (with integer) operators to TimeUnit
This commit is contained in:
@@ -173,6 +173,21 @@ public:
|
||||
MOZ_ASSERT(!IsInfinite() && !aOther.IsInfinite());
|
||||
return TimeUnit(mValue - aOther.mValue);
|
||||
}
|
||||
TimeUnit& operator += (const TimeUnit& aOther) {
|
||||
*this = *this + aOther;
|
||||
return *this;
|
||||
}
|
||||
TimeUnit& operator -= (const TimeUnit& aOther) {
|
||||
*this = *this - aOther;
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend TimeUnit operator* (int aVal, const TimeUnit& aUnit) {
|
||||
return TimeUnit(aUnit.mValue * aVal);
|
||||
}
|
||||
friend TimeUnit operator* (const TimeUnit& aUnit, int aVal) {
|
||||
return TimeUnit(aUnit.mValue * aVal);
|
||||
}
|
||||
|
||||
bool IsValid() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user