From 7baf727790f0bd9879ae60bb52d703c113875238 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Mon, 28 Jul 2008 23:21:03 +0000 Subject: Enforcing use of nullZonePtr only for nulling out pointers, as it is useless for comparisons. svn-id: r33384 --- engines/parallaction/exec_ns.cpp | 2 +- engines/parallaction/input.cpp | 2 +- engines/parallaction/walk.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'engines') 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; -- cgit v1.2.3