BPoint: Replace max_c() and min_c() with std::max() and std::min()

This commit is contained in:
John Scipione 2014-05-20 15:48:04 -04:00
parent e430d19ef6
commit 1867d69c8b

View File

@ -4,11 +4,14 @@
*
* Authors:
* Frans van Nispen
* John Scipione, jscipione@gmail.com
*/
#include <Point.h>
#include <algorithm>
#include <stdio.h>
#include <SupportDefs.h>
@ -21,8 +24,8 @@ const BPoint B_ORIGIN(0, 0);
void
BPoint::ConstrainTo(BRect rect)
{
x = max_c(min_c(x, rect.right), rect.left);
y = max_c(min_c(y, rect.bottom), rect.top);
x = std::max(std::min(x, rect.right), rect.left);
y = std::max(std::min(y, rect.bottom), rect.top);
}