From bc4e10dabca5b76283eb6fb431702ccd92a001c0 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Tue, 21 Aug 2012 23:02:39 -0400 Subject: LASTEXPRESS: Remove some unreachable code --- engines/lastexpress/fight/fight.cpp | 2 -- engines/lastexpress/game/action.cpp | 2 -- engines/lastexpress/game/inventory.cpp | 2 -- engines/lastexpress/game/savegame.cpp | 2 +- engines/lastexpress/sound/entry.cpp | 4 +--- 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/engines/lastexpress/fight/fight.cpp b/engines/lastexpress/fight/fight.cpp index b00c1732e7..49a9b85657 100644 --- a/engines/lastexpress/fight/fight.cpp +++ b/engines/lastexpress/fight/fight.cpp @@ -39,10 +39,8 @@ #include "lastexpress/game/state.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/game/action.cpp b/engines/lastexpress/game/action.cpp index 60a309518a..033fdfc2e8 100644 --- a/engines/lastexpress/game/action.cpp +++ b/engines/lastexpress/game/action.cpp @@ -421,8 +421,6 @@ SceneIndex Action::processHotspot(const SceneHotspot &hotspot) { // Action 0 IMPLEMENT_ACTION(dummy) error("[Action::action_dummy] Dummy action function called (hotspot action: %d)", hotspot.action); - - return kSceneInvalid; } ////////////////////////////////////////////////////////////////////////// diff --git a/engines/lastexpress/game/inventory.cpp b/engines/lastexpress/game/inventory.cpp index 52c00ece31..9e0f583c63 100644 --- a/engines/lastexpress/game/inventory.cpp +++ b/engines/lastexpress/game/inventory.cpp @@ -35,10 +35,8 @@ #include "lastexpress/menu/menu.h" #include "lastexpress/sound/queue.h" -#include "lastexpress/sound/sound.h" #include "lastexpress/graphics.h" -#include "lastexpress/helpers.h" #include "lastexpress/lastexpress.h" #include "lastexpress/resource.h" diff --git a/engines/lastexpress/game/savegame.cpp b/engines/lastexpress/game/savegame.cpp index 360e99146a..9857ef24cc 100644 --- a/engines/lastexpress/game/savegame.cpp +++ b/engines/lastexpress/game/savegame.cpp @@ -550,7 +550,7 @@ void SaveLoad::saveGame(SavegameType type, EntityIndex entity, uint32 value) { entry.saveLoadWithSerializer(ser); if (!entry.isValid()) { - error("[SaveLoad::saveGame] Invalid entry. This savegame might be corrupted"); + warning("[SaveLoad::saveGame] Invalid entry. This savegame might be corrupted"); _savegame->seek(header.offset); } else if (getState()->time < entry.time || (type == kSavegameTypeTickInterval && getState()->time == entry.time)) { // Not ready to save a game, skipping! diff --git a/engines/lastexpress/sound/entry.cpp b/engines/lastexpress/sound/entry.cpp index f2a063e45f..3d22657124 100644 --- a/engines/lastexpress/sound/entry.cpp +++ b/engines/lastexpress/sound/entry.cpp @@ -116,10 +116,8 @@ void SoundEntry::close() { } void SoundEntry::play() { - if (!_stream) { + if (!_stream) error("[SoundEntry::play] stream has been disposed"); - return; - } // Prepare sound stream if (!_soundStream) -- cgit v1.2.3