mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1577236 - clang-10: Fix a -Wimplicit-int-float-conversion warning in ExtendInputEffectD2D1 r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D60998 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
8ce4456bc5
commit
7fc89d3fa3
@ -105,10 +105,10 @@ static D2D1_RECT_L ConvertFloatToLongRect(const D2D1_VECTOR_4F& aRect) {
|
||||
// Clamp values to LONG range. We can't use std::min/max here because we want
|
||||
// the comparison to operate on a type that's different from the type of the
|
||||
// result.
|
||||
return D2D1::RectL(aRect.x <= LONG_MIN ? LONG_MIN : LONG(aRect.x),
|
||||
aRect.y <= LONG_MIN ? LONG_MIN : LONG(aRect.y),
|
||||
aRect.z >= LONG_MAX ? LONG_MAX : LONG(aRect.z),
|
||||
aRect.w >= LONG_MAX ? LONG_MAX : LONG(aRect.w));
|
||||
return D2D1::RectL(aRect.x <= float(LONG_MIN) ? LONG_MIN : LONG(aRect.x),
|
||||
aRect.y <= float(LONG_MIN) ? LONG_MIN : LONG(aRect.y),
|
||||
aRect.z >= float(LONG_MAX) ? LONG_MAX : LONG(aRect.z),
|
||||
aRect.w >= float(LONG_MAX) ? LONG_MAX : LONG(aRect.w));
|
||||
}
|
||||
|
||||
static D2D1_RECT_L IntersectRect(const D2D1_RECT_L& aRect1,
|
||||
|
Loading…
Reference in New Issue
Block a user