From 5aad09213ba5392d5065a04f1547e359e39457a8 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Wed, 11 Jun 2014 21:04:01 -0400 Subject: LASTEXPRESS: Replace useless checks by asserts. CID 1004086, 1004090 --- engines/lastexpress/game/entities.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'engines/lastexpress/game') diff --git a/engines/lastexpress/game/entities.cpp b/engines/lastexpress/game/entities.cpp index 26a82884b1..b881d34ebe 100644 --- a/engines/lastexpress/game/entities.cpp +++ b/engines/lastexpress/game/entities.cpp @@ -389,7 +389,6 @@ void Entities::resetState(EntityIndex entityIndex) { getLogic()->updateCursor(); } - void Entities::updateFields() const { if (!getFlags()->isGameRunning) return; @@ -897,7 +896,6 @@ void Entities::computeCurrentFrame(EntityIndex entityIndex) const { } break; - case kDirectionLeft: if (data->currentFrame == -1 || data->currentFrame >= (int32)data->sequence->count()) { data->currentFrame = 0; @@ -1772,8 +1770,7 @@ void Entities::enterCompartment(EntityIndex entity, ObjectIndex compartment, boo // Update compartments int index = (compartment < 32 ? compartment - 1 : compartment - 24); - if (index >= 16) - error("[Entities::enterCompartment] Invalid compartment index"); + assert(index < 16); if (useCompartment1) _compartments1[index] |= STORE_VALUE(entity); @@ -1858,8 +1855,7 @@ void Entities::exitCompartment(EntityIndex entity, ObjectIndex compartment, bool // Update compartments int index = (compartment < 32 ? compartment - 1 : compartment - 24); - if (index >= 16) - error("[Entities::exitCompartment] Invalid compartment index"); + assert(index < 16); if (useCompartment1) _compartments1[index] &= ~STORE_VALUE(entity); -- cgit v1.2.3