mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 853398: Disable TimeDuration::operator* (double) using MOZ_DELETE. r=bz
This commit is contained in:
parent
fcf8395b70
commit
c817d69e80
@ -92,8 +92,15 @@ public:
|
||||
mValue -= aOther.mValue;
|
||||
return *this;
|
||||
}
|
||||
TimeDuration operator*(const double aMultiplier) const {
|
||||
return TimeDuration::FromTicks(mValue * int64_t(aMultiplier));
|
||||
|
||||
private:
|
||||
// Block double multiplier (slower, imprecise if long duration) - Bug 853398.
|
||||
// If required, use MultDouble explicitly and with care.
|
||||
TimeDuration operator*(const double aMultiplier) const MOZ_DELETE;
|
||||
|
||||
public:
|
||||
TimeDuration MultDouble(double aMultiplier) const {
|
||||
return TimeDuration::FromTicks(static_cast<int64_t>(mValue * aMultiplier));
|
||||
}
|
||||
TimeDuration operator*(const int32_t aMultiplier) const {
|
||||
return TimeDuration::FromTicks(mValue * int64_t(aMultiplier));
|
||||
|
Loading…
Reference in New Issue
Block a user