[Scummvm-git-logs] scummvm master -> 9744ca78bb412a0b61ded3f4cc8a81104330ee9c
dreammaster
dreammaster at scummvm.org
Sat Apr 1 22:55:17 CEST 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9744ca78bb TITANIC: Fix vector equality operators
Commit: 9744ca78bb412a0b61ded3f4cc8a81104330ee9c
https://github.com/scummvm/scummvm/commit/9744ca78bb412a0b61ded3f4cc8a81104330ee9c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-04-01T16:55:08-04:00
Commit Message:
TITANIC: Fix vector equality operators
Changed paths:
engines/titanic/star_control/dvector.h
engines/titanic/star_control/fvector.h
diff --git a/engines/titanic/star_control/dvector.h b/engines/titanic/star_control/dvector.h
index fcb463b..d3638cf 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 0dea0c3..dd8a25e 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 {
More information about the Scummvm-git-logs
mailing list