From 982502650f8b6378f30dfbd324cd7881f6e30ab0 Mon Sep 17 00:00:00 2001 From: Matthew Stewart Date: Sat, 28 Jul 2018 14:31:26 -0400 Subject: STARTREK: Replace min & max with MIN & MAX --- engines/startrek/common.cpp | 8 ++++---- engines/startrek/common.h | 10 ---------- engines/startrek/textbox.cpp | 2 +- 3 files changed, 5 insertions(+), 15 deletions(-) (limited to 'engines') diff --git a/engines/startrek/common.cpp b/engines/startrek/common.cpp index 9fb4112cb4..b88c3f63e8 100644 --- a/engines/startrek/common.cpp +++ b/engines/startrek/common.cpp @@ -27,10 +27,10 @@ namespace StarTrek { Common::Rect getRectEncompassing(Common::Rect r1, Common::Rect r2) { - uint16 l = min(r1.left, r2.left); - uint16 t = min(r1.top, r2.top); - uint16 r = max(r1.right, r2.right); - uint16 b = max(r1.bottom, r2.bottom); + uint16 l = MIN(r1.left, r2.left); + uint16 t = MIN(r1.top, r2.top); + uint16 r = MAX(r1.right, r2.right); + uint16 b = MAX(r1.bottom, r2.bottom); return Common::Rect(l, t, r, b); } diff --git a/engines/startrek/common.h b/engines/startrek/common.h index c7a512a9cd..57408b8c07 100644 --- a/engines/startrek/common.h +++ b/engines/startrek/common.h @@ -32,16 +32,6 @@ class Serializer; namespace StarTrek { -template -T min(T a, T b) { - return a < b ? a : b; -} - -template -T max(T a, T b) { - return a > b ? a : b; -} - Common::Rect getRectEncompassing(Common::Rect r1, Common::Rect r2); void serializeRect(Common::Rect rect, Common::Serializer &ser); diff --git a/engines/startrek/textbox.cpp b/engines/startrek/textbox.cpp index e32f456bc0..f82369c867 100644 --- a/engines/startrek/textbox.cpp +++ b/engines/startrek/textbox.cpp @@ -142,7 +142,7 @@ String StarTrekEngine::centerTextboxHeader(String headerText) { text[TEXT_CHARS_PER_LINE] = '\0'; int strlen = headerText.size(); - strlen = min(strlen, TEXT_CHARS_PER_LINE); + strlen = MIN(strlen, TEXT_CHARS_PER_LINE); memcpy(text + (TEXT_CHARS_PER_LINE - strlen) / 2, headerText.c_str(), strlen); -- cgit v1.2.3