mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1929258 - Use std::clamp instead of min/max chain in xpfe/appshell/ r=gstoll
Differential Revision: https://phabricator.services.mozilla.com/D227971
This commit is contained in:
parent
d337c98ae6
commit
efab72853b
@ -1233,7 +1233,7 @@ static Maybe<int32_t> ReadSize(const Element& aElement, nsAtom* aAttr,
|
||||
int32_t max = ReadIntAttribute(aElement, aMaxAttr)
|
||||
.valueOr(std::numeric_limits<int32_t>::max());
|
||||
|
||||
return Some(std::min(max, std::max(*attr, min)));
|
||||
return Some(std::clamp(*attr, min, max));
|
||||
}
|
||||
|
||||
bool AppWindow::LoadSizeFromXUL(int32_t& aSpecWidth, int32_t& aSpecHeight) {
|
||||
|
Loading…
Reference in New Issue
Block a user