aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Stewart2018-07-28 14:31:26 -0400
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commit982502650f8b6378f30dfbd324cd7881f6e30ab0 (patch)
tree80a2955d80c694f9f7eceefa39146c5c64e9c99b /engines
parentbe4174dc3df84e89dbab95af1b6f4af896c08125 (diff)
downloadscummvm-rg350-982502650f8b6378f30dfbd324cd7881f6e30ab0.tar.gz
scummvm-rg350-982502650f8b6378f30dfbd324cd7881f6e30ab0.tar.bz2
scummvm-rg350-982502650f8b6378f30dfbd324cd7881f6e30ab0.zip
STARTREK: Replace min & max with MIN & MAX
Diffstat (limited to 'engines')
-rw-r--r--engines/startrek/common.cpp8
-rw-r--r--engines/startrek/common.h10
-rw-r--r--engines/startrek/textbox.cpp2
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);