aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNicola Mettifogo2008-07-28 23:21:03 +0000
committerNicola Mettifogo2008-07-28 23:21:03 +0000
commit7baf727790f0bd9879ae60bb52d703c113875238 (patch)
treea98d6df4baefdd3fcee31a3b11f7138bf7524d44 /engines
parent09f70b640897b4b36185acd7359e908eb0e3ae7b (diff)
downloadscummvm-rg350-7baf727790f0bd9879ae60bb52d703c113875238.tar.gz
scummvm-rg350-7baf727790f0bd9879ae60bb52d703c113875238.tar.bz2
scummvm-rg350-7baf727790f0bd9879ae60bb52d703c113875238.zip
Enforcing use of nullZonePtr only for nulling out pointers, as it is useless for comparisons.
svn-id: r33384
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/exec_ns.cpp2
-rw-r--r--engines/parallaction/input.cpp2
-rw-r--r--engines/parallaction/walk.cpp6
3 files changed, 5 insertions, 5 deletions
diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp
index fbfb462f9a..e01fdd9d0b 100644
--- a/engines/parallaction/exec_ns.cpp
+++ b/engines/parallaction/exec_ns.cpp
@@ -487,7 +487,7 @@ CommandExec_ns::~CommandExec_ns() {
//
void Parallaction::enterCommentMode(ZonePtr z) {
- if (z == nullZonePtr) {
+ if (!z) {
return;
}
diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp
index 0e6e135cc3..287618e803 100644
--- a/engines/parallaction/input.cpp
+++ b/engines/parallaction/input.cpp
@@ -187,7 +187,7 @@ void Input::trackMouse(ZonePtr z) {
return;
}
- if (z == nullZonePtr) {
+ if (!z) {
return;
}
diff --git a/engines/parallaction/walk.cpp b/engines/parallaction/walk.cpp
index 14d8d080bd..bf8f423fd5 100644
--- a/engines/parallaction/walk.cpp
+++ b/engines/parallaction/walk.cpp
@@ -400,13 +400,13 @@ void PathBuilder_BR::buildPath(uint16 x, uint16 y) {
// look for short circuit cases
ZonePtr z0 = _vm->hitZone(kZonePath, x, y);
- if (z0 == nullZonePtr) {
+ if (!z0) {
_ch->_walkPath.push_back(dest);
debugC(3, kDebugWalk, "buildPath: corner case 0");
return;
}
ZonePtr z1 = _vm->hitZone(kZonePath, foot.x, foot.y);
- if (z1 == nullZonePtr || z1 == z0) {
+ if (!z1 || z1 == z0) {
_ch->_walkPath.push_back(dest);
debugC(3, kDebugWalk, "buildPath: corner case 1");
return;
@@ -444,7 +444,7 @@ void PathWalker_BR::finalizeWalk() {
_ch->getFoot(foot);
ZonePtr z = _vm->hitZone(kZoneDoor, foot.x, foot.y);
- if (z != nullZonePtr && (z->_flags & kFlagsClosed) == 0) {
+ if (z && ((z->_flags & kFlagsClosed) == 0)) {
_vm->_location._startPosition = z->u.door->_startPos; // foot pos
_vm->_location._startFrame = z->u.door->_startFrame;