Merge pull request #3026 from lioncash/constexpr

MathUtil: Make Clamp and IsPow2 constexpr functions.
This commit is contained in:
Ryan Houdek
2015-09-12 02:28:38 -04:00
14 changed files with 46 additions and 70 deletions

View File

@ -677,8 +677,8 @@ void CFrame::SetPaneSize()
H = Perspectives[ActivePerspective].Height[j];
// Check limits
MathUtil::Clamp<u32>(&W, 5, 95);
MathUtil::Clamp<u32>(&H, 5, 95);
W = MathUtil::Clamp<u32>(W, 5, 95);
H = MathUtil::Clamp<u32>(H, 5, 95);
// Convert percentages to pixel lengths
W = (W * iClientX) / 100;