aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2014-06-27 07:34:27 +0200
committerStrangerke2014-06-27 07:34:27 +0200
commitb08b3eac33a6f4039df5f55a15557f7a2eca245f (patch)
treecc631fea1d3643b6e3a8b9ec40746e3870ec933d
parente9396f8d1035b771d8c3fe99d8b815a3db39cfe5 (diff)
downloadscummvm-rg350-b08b3eac33a6f4039df5f55a15557f7a2eca245f.tar.gz
scummvm-rg350-b08b3eac33a6f4039df5f55a15557f7a2eca245f.tar.bz2
scummvm-rg350-b08b3eac33a6f4039df5f55a15557f7a2eca245f.zip
CGE2: Add a virtual destructor in Choice, some minor cleanup
-rw-r--r--engines/cge2/text.cpp2
-rw-r--r--engines/cge2/vga13h.h2
-rw-r--r--engines/cge2/vmenu.h3
3 files changed, 4 insertions, 3 deletions
diff --git a/engines/cge2/text.cpp b/engines/cge2/text.cpp
index c7f6a06894..24fc8e5376 100644
--- a/engines/cge2/text.cpp
+++ b/engines/cge2/text.cpp
@@ -45,7 +45,7 @@ Text::Text(CGE2Engine *vm, const char *fname) : _vm(vm) {
_cache = new Handler[txtCount];
for (_size = 0; _size < txtCount; _size++) {
_cache[_size]._ref = 0;
- _cache[_size]._text = NULL;
+ _cache[_size]._text = nullptr;
}
load();
}
diff --git a/engines/cge2/vga13h.h b/engines/cge2/vga13h.h
index 6876bcd825..5e1280c6c9 100644
--- a/engines/cge2/vga13h.h
+++ b/engines/cge2/vga13h.h
@@ -55,7 +55,7 @@ namespace CGE2 {
class FXP { // fixed point
uint16 f;
int16 i;
- long& Joined (void) const { return *(long *)&f; }
+ long& Joined() const { return *(long *)&f; }
public:
FXP (void): f(0), i(0) { }
FXP (int i0, int f0 = 0) : i(i0), f(0) { }
diff --git a/engines/cge2/vmenu.h b/engines/cge2/vmenu.h
index c988e1ed2b..724fb5d865 100644
--- a/engines/cge2/vmenu.h
+++ b/engines/cge2/vmenu.h
@@ -45,6 +45,7 @@ public:
virtual void proc() = 0;
Choice(CGE2Engine *vm) : _vm(vm), _text(nullptr) {}
+ virtual ~Choice() {}
};
class StartCountDownChoice : public Choice {
@@ -76,7 +77,7 @@ public:
MenuBar *_bar;
VMenu(CGE2Engine *vm, Common::Array<Choice *> list, V2D pos, ColorBank col);
- ~VMenu(void);
+ ~VMenu();
void touch(uint16 mask, V2D pos, Common::KeyCode keyCode);
char *vmGather(Common::Array<Choice *> list);
};