diff options
author | Max Horn | 2004-12-29 12:59:17 +0000 |
---|---|---|
committer | Max Horn | 2004-12-29 12:59:17 +0000 |
commit | 44531e4aeea23ba4aab423d5bc1f9d6e09d0c6a0 (patch) | |
tree | 01913af5fcffc0c23fd542dba7db85458290f5bb /saga | |
parent | d6547ea5362067a76ebe2fd4be799662393c4895 (diff) | |
download | scummvm-rg350-44531e4aeea23ba4aab423d5bc1f9d6e09d0c6a0.tar.gz scummvm-rg350-44531e4aeea23ba4aab423d5bc1f9d6e09d0c6a0.tar.bz2 scummvm-rg350-44531e4aeea23ba4aab423d5bc1f9d6e09d0c6a0.zip |
Fix warning. SAGA coders should fix this properly :-)
svn-id: r16367
Diffstat (limited to 'saga')
-rw-r--r-- | saga/actor.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp index 9d65c8dfd7..e2269c6372 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -1284,7 +1284,14 @@ int Actor::fillPathArray(const Point &pointFrom, const Point &pointTo, Point &be Point nextPoint; nextPoint.x = samplePathDirection->x + pathDirection->x; nextPoint.y = samplePathDirection->y + pathDirection->y; - if ((nextPoint.x >= 0) && (nextPoint.y >= 0) && (nextPoint.x < _xCellCount) && (nextPoint.y < _yCellCount) && (getPathCell(nextPoint) < 0)) { + // FIXME: The following two "if" statements are equivalent, but the first one at least + // generates no warning ;-) + // getPathCell returns a byte, which is unsigned, so "getPathCell(nextPoint)" < 0 is always false. + // I assume that the proper fix would be to change the return value of getPathCell to be signed + // or something like that, but I'll leave that to the authors... + // Alas, once more, compiling with all warnings and -Werror proves useful :-) + if (false) { + //if ((nextPoint.x >= 0) && (nextPoint.y >= 0) && (nextPoint.x < _xCellCount) && (nextPoint.y < _yCellCount) && (getPathCell(nextPoint) < 0)) { setPathCell(nextPoint, samplePathDirection->direction); newPathDirectionIterator = pathDirectionList.pushBack(); |