From cdfd5f85c888525c274f309a4b313f8aa2fa6636 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 18 Apr 2013 20:10:33 +0200 Subject: ENGINES: Silence clang warning about unused private member _vm This affects the Console / debugger classes of multiple engines. An alternative solution would have been to remove the unused _vm member vars. However, it seems likely that in the future, the _vm member could be useful for methods added to the console. So instead, we add a simple assert(_vm) to silence the clang warning. --- engines/cine/console.cpp | 1 + engines/draci/console.cpp | 1 + engines/dreamweb/console.cpp | 1 + engines/made/console.cpp | 1 + engines/sword1/console.cpp | 1 + engines/sword25/console.cpp | 1 + engines/toon/console.cpp | 1 + engines/tucker/console.cpp | 3 ++- 8 files changed, 9 insertions(+), 1 deletion(-) diff --git a/engines/cine/console.cpp b/engines/cine/console.cpp index 4af28592e7..46f0ea61d3 100644 --- a/engines/cine/console.cpp +++ b/engines/cine/console.cpp @@ -28,6 +28,7 @@ namespace Cine { bool labyrinthCheat; CineConsole::CineConsole(CineEngine *vm) : GUI::Debugger(), _vm(vm) { + assert(_vm); DCmd_Register("labyrinthCheat", WRAP_METHOD(CineConsole, Cmd_LabyrinthCheat)); labyrinthCheat = false; diff --git a/engines/draci/console.cpp b/engines/draci/console.cpp index a0013c59fe..07f0ff5542 100644 --- a/engines/draci/console.cpp +++ b/engines/draci/console.cpp @@ -26,6 +26,7 @@ namespace Draci { DraciConsole::DraciConsole(DraciEngine *vm) : GUI::Debugger(), _vm(vm) { + assert(_vm); } DraciConsole::~DraciConsole() { diff --git a/engines/dreamweb/console.cpp b/engines/dreamweb/console.cpp index d415089a48..532bf815ef 100644 --- a/engines/dreamweb/console.cpp +++ b/engines/dreamweb/console.cpp @@ -25,6 +25,7 @@ namespace DreamWeb { DreamWebConsole::DreamWebConsole(DreamWebEngine *vm) : GUI::Debugger(), _vm(vm) { + assert(_vm); } DreamWebConsole::~DreamWebConsole() { diff --git a/engines/made/console.cpp b/engines/made/console.cpp index c835988788..0076b6a4f9 100644 --- a/engines/made/console.cpp +++ b/engines/made/console.cpp @@ -26,6 +26,7 @@ namespace Made { MadeConsole::MadeConsole(MadeEngine *vm) : GUI::Debugger(), _vm(vm) { + assert(_vm); } MadeConsole::~MadeConsole() { diff --git a/engines/sword1/console.cpp b/engines/sword1/console.cpp index 603efd308e..4c55f8d990 100644 --- a/engines/sword1/console.cpp +++ b/engines/sword1/console.cpp @@ -26,6 +26,7 @@ namespace Sword1 { SwordConsole::SwordConsole(SwordEngine *vm) : GUI::Debugger(), _vm(vm) { + assert(_vm); } SwordConsole::~SwordConsole() { diff --git a/engines/sword25/console.cpp b/engines/sword25/console.cpp index 5d15f189ab..f1b91d2bc2 100644 --- a/engines/sword25/console.cpp +++ b/engines/sword25/console.cpp @@ -26,6 +26,7 @@ namespace Sword25 { Sword25Console::Sword25Console(Sword25Engine *vm) : GUI::Debugger(), _vm(vm) { + assert(_vm); } Sword25Console::~Sword25Console() { diff --git a/engines/toon/console.cpp b/engines/toon/console.cpp index 8037dca4cb..18f81e1323 100644 --- a/engines/toon/console.cpp +++ b/engines/toon/console.cpp @@ -26,6 +26,7 @@ namespace Toon { ToonConsole::ToonConsole(ToonEngine *vm) : GUI::Debugger(), _vm(vm) { + assert(_vm); } ToonConsole::~ToonConsole() { diff --git a/engines/tucker/console.cpp b/engines/tucker/console.cpp index e0f2debc30..17ba2038d0 100644 --- a/engines/tucker/console.cpp +++ b/engines/tucker/console.cpp @@ -11,7 +11,7 @@ * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License @@ -26,6 +26,7 @@ namespace Tucker { TuckerConsole::TuckerConsole(TuckerEngine *vm) : _vm(vm) { + assert(_vm); } TuckerConsole::~TuckerConsole() { -- cgit v1.2.3