diff options
-rw-r--r-- | engines/startrek/common.cpp | 8 | ||||
-rw-r--r-- | engines/startrek/common.h | 10 | ||||
-rw-r--r-- | engines/startrek/textbox.cpp | 2 |
3 files changed, 5 insertions, 15 deletions
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<class T> -T min(T a, T b) { - return a < b ? a : b; -} - -template<class T> -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); |