зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1228314 - added static_cast<int64> in order to avoid overflow. r=seth
MozReview-Commit-ID: KY3qpIlzE5K --HG-- extra : rebase_source : a716abcb496c9923318f58d21250b6c13182add0
This commit is contained in:
Родитель
b700af6edd
Коммит
3627cdff1f
|
@ -327,7 +327,8 @@ public:
|
|||
// Compare sizes. We use an area-based heuristic here instead of computing a
|
||||
// truly optimal answer, since it seems very unlikely to make a difference
|
||||
// for realistic sizes.
|
||||
int64_t idealArea = idealKey.Size().width * idealKey.Size().height;
|
||||
int64_t idealArea = static_cast<int64_t>(idealKey.Size().width) *
|
||||
static_cast<int64_t>(idealKey.Size().height);
|
||||
int64_t surfaceArea = aSurfaceKey.Size().width * aSurfaceKey.Size().height;
|
||||
int64_t bestMatchArea =
|
||||
bestMatchKey.Size().width * bestMatchKey.Size().height;
|
||||
|
|
Загрузка…
Ссылка в новой задаче