aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek/action.h
diff options
context:
space:
mode:
authorPaul Gilbert2018-06-20 07:09:55 -0700
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commit7d110de48f8aa0af09b34fa1741eaf992b1201c8 (patch)
tree8c71a1d7c21a793de6fc7e2bdc522e1b84235bbd /engines/startrek/action.h
parentdc1e44efb9863333300482bcb4c352cf8de66bf8 (diff)
downloadscummvm-rg350-7d110de48f8aa0af09b34fa1741eaf992b1201c8.tar.gz
scummvm-rg350-7d110de48f8aa0af09b34fa1741eaf992b1201c8.tar.bz2
scummvm-rg350-7d110de48f8aa0af09b34fa1741eaf992b1201c8.zip
STARTREK: Silence most Visual Studio warnings
Enums are signed in at least Visual Studio, and it was generating many warnings of the cast to byte in the Action constructor was losing precision. Likewise, there were some cases of -1 being passed as a parameter to Action. This resolves these warnings by making the constructor parameters int
Diffstat (limited to 'engines/startrek/action.h')
-rw-r--r--engines/startrek/action.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/engines/startrek/action.h b/engines/startrek/action.h
index af27177963..a501b7860a 100644
--- a/engines/startrek/action.h
+++ b/engines/startrek/action.h
@@ -25,6 +25,8 @@
#include "common/serializer.h"
+namespace StarTrek {
+
enum Acton {
ACTION_TICK = 0,
@@ -49,11 +51,11 @@ struct Action : Common::Serializable {
byte b3;
Action() {}
- Action(byte _type, byte _b1, byte _b2, byte _b3)
- : type(_type),
- b1(_b1),
- b2(_b2),
- b3(_b3) {}
+ Action(int _type, int _b1, int _b2, int _b3)
+ : type((byte)_type),
+ b1((byte)_b1),
+ b2((byte)_b2),
+ b3((byte)_b3) {}
// ACTION_USE, ACTION_GET, ACTION_LOOK, ACTION_TALK
@@ -89,4 +91,6 @@ struct Action : Common::Serializable {
}
};
+}
+
#endif