aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/star_control
diff options
context:
space:
mode:
authorPaul Gilbert2017-04-01 16:55:08 -0400
committerPaul Gilbert2017-04-01 16:55:08 -0400
commit9744ca78bb412a0b61ded3f4cc8a81104330ee9c (patch)
tree91820bf5779102cbc65da9a5c7b7254a49ff1582 /engines/titanic/star_control
parent0ae9230be225cbb9ca129b3bc37c3ef44671a24d (diff)
downloadscummvm-rg350-9744ca78bb412a0b61ded3f4cc8a81104330ee9c.tar.gz
scummvm-rg350-9744ca78bb412a0b61ded3f4cc8a81104330ee9c.tar.bz2
scummvm-rg350-9744ca78bb412a0b61ded3f4cc8a81104330ee9c.zip
TITANIC: Fix vector equality operators
Diffstat (limited to 'engines/titanic/star_control')
-rw-r--r--engines/titanic/star_control/dvector.h4
-rw-r--r--engines/titanic/star_control/fvector.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/titanic/star_control/dvector.h b/engines/titanic/star_control/dvector.h
index fcb463b715..d3638cfeac 100644
--- a/engines/titanic/star_control/dvector.h
+++ b/engines/titanic/star_control/dvector.h
@@ -58,14 +58,14 @@ public:
* Returns true if the passed vector equals this one
*/
bool operator==(const DVector &src) const {
- return _x != src._x || _y != src._y || _z != src._z;
+ return _x == src._x && _y == src._y && _z == src._z;
}
/**
* Returns true if the passed vector does not equal this one
*/
bool operator!=(const DVector &src) const {
- return !operator==(src);
+ return _x != src._x || _y != src._y || _z != src._z;
}
DVector operator+(const DVector &delta) const {
diff --git a/engines/titanic/star_control/fvector.h b/engines/titanic/star_control/fvector.h
index 0dea0c32bb..dd8a25e957 100644
--- a/engines/titanic/star_control/fvector.h
+++ b/engines/titanic/star_control/fvector.h
@@ -79,14 +79,14 @@ public:
* Returns true if the passed vector equals this one
*/
bool operator==(const FVector &src) const {
- return _x != src._x || _y != src._y || _z != src._z;
+ return _x == src._x && _y == src._y && _z == src._z;
}
/**
* Returns true if the passed vector does not equal this one
*/
bool operator!=(const FVector &src) const {
- return !operator==(src);
+ return _x != src._x || _y != src._y || _z != src._z;
}
FVector operator+(const FVector &delta) const {