From 14a59b97b289416bc124985e7b5f3b45d8e7a7e0 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 4 Jul 2012 23:36:11 +0200 Subject: CGE: Silent some CppCheck warnings --- engines/cge/bitmap.cpp | 3 +++ engines/cge/vmenu.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp index 309b89bdda..4f85957b3d 100644 --- a/engines/cge/bitmap.cpp +++ b/engines/cge/bitmap.cpp @@ -123,12 +123,15 @@ Bitmap::~Bitmap() { Bitmap &Bitmap::operator=(const Bitmap &bmp) { debugC(1, kCGEDebugBitmap, "&Bitmap::operator ="); + if (this == &bmp) + return *this; uint8 *v0 = bmp._v; _w = bmp._w; _h = bmp._h; _m = NULL; _map = 0; + _vm = bmp._vm; delete[] _v; if (v0 == NULL) { diff --git a/engines/cge/vmenu.cpp b/engines/cge/vmenu.cpp index 84b557f4a6..910e54d267 100644 --- a/engines/cge/vmenu.cpp +++ b/engines/cge/vmenu.cpp @@ -63,7 +63,7 @@ Vmenu *Vmenu::_addr = NULL; int Vmenu::_recent = -1; Vmenu::Vmenu(CGEEngine *vm, Choice *list, int x, int y) - : Talk(vm, VMGather(list), kTBRect), _menu(list), _bar(NULL), _vm(vm) { + : Talk(vm, VMGather(list), kTBRect), _menu(list), _bar(NULL), _vmgt(NULL), _vm(vm) { Choice *cp; _addr = this; -- cgit v1.2.3