From 532c8733116c86f55b3e38fcc8e518754b068d64 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Fri, 30 May 2014 19:46:30 -0400 Subject: [PATCH] BRect: Replace max_c() and min_c() with std::max() and std::min() --- src/kits/interface/Rect.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/kits/interface/Rect.cpp b/src/kits/interface/Rect.cpp index c7689c538f..0f30b93424 100644 --- a/src/kits/interface/Rect.cpp +++ b/src/kits/interface/Rect.cpp @@ -1,15 +1,19 @@ /* - * Copyright 2001-2012, Haiku, Inc. All Rights Reserved. + * Copyright 2001-2014 Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: * Frans van Nispen + * John Scipione, jscipione@gmail.com */ -#include #include +#include + +#include + void BRect::SetLeftTop(const BPoint point) @@ -230,16 +234,16 @@ BRect::operator!=(BRect other) const BRect BRect::operator&(BRect other) const { - return BRect(max_c(left, other.left), max_c(top, other.top), - min_c(right, other.right), min_c(bottom, other.bottom)); + return BRect(std::max(left, other.left), std::max(top, other.top), + std::min(right, other.right), std::min(bottom, other.bottom)); } BRect BRect::operator|(BRect other) const { - return BRect(min_c(left, other.left), min_c(top, other.top), - max_c(right, other.right), max_c(bottom, other.bottom)); + return BRect(std::min(left, other.left), std::min(top, other.top), + std::max(right, other.right), std::max(bottom, other.bottom)); }