aboutsummaryrefslogtreecommitdiff
path: root/engines/cge
diff options
context:
space:
mode:
authorStrangerke2011-08-07 11:34:03 +0200
committerStrangerke2011-08-07 11:34:03 +0200
commitcbb828b337979e4dae4d5f1560ca4debe94079c4 (patch)
treee730c008047cc88ab30639a5ce2744ad5a48902c /engines/cge
parent04e09e530a3bff231022ebf1c50ae5b70fc1c4a7 (diff)
downloadscummvm-rg350-cbb828b337979e4dae4d5f1560ca4debe94079c4.tar.gz
scummvm-rg350-cbb828b337979e4dae4d5f1560ca4debe94079c4.tar.bz2
scummvm-rg350-cbb828b337979e4dae4d5f1560ca4debe94079c4.zip
CGE: Fix a couple of warnings reported by cppcheck
Diffstat (limited to 'engines/cge')
-rw-r--r--engines/cge/cfile.h8
-rw-r--r--engines/cge/cge_main.cpp2
-rw-r--r--engines/cge/detection.cpp2
-rw-r--r--engines/cge/vol.cpp2
-rw-r--r--engines/cge/walk.cpp2
-rw-r--r--engines/cge/walk.h3
6 files changed, 8 insertions, 11 deletions
diff --git a/engines/cge/cfile.h b/engines/cge/cfile.h
index 6ed3b5e750..f5d784073b 100644
--- a/engines/cge/cfile.h
+++ b/engines/cge/cfile.h
@@ -41,13 +41,11 @@ protected:
uint16 _ptr;
uint16 _lim;
long _bufMark;
- uint16 _seed;
- Crypt *_crypt;
virtual void readBuf();
virtual void writeBuf();
public:
- IoBuf(IOMode mode, Crypt *crpt = NULL);
- IoBuf(const char *name, IOMode mode, Crypt *crpt = NULL);
+ IoBuf(IOMode mode, Crypt *crpt);
+ IoBuf(const char *name, IOMode mode, Crypt *crpt);
virtual ~IoBuf();
uint16 read(void *buf, uint16 len);
uint16 read(uint8 *buf);
@@ -61,7 +59,7 @@ public:
class CFile : public IoBuf {
public:
static uint16 _maxLineLen;
- CFile(const char *name, IOMode mode = kModeRead, Crypt *crpt = NULL);
+ CFile(const char *name, IOMode mode, Crypt *crpt);
virtual ~CFile();
void flush();
long mark();
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index fd45dd797f..d709b65c1d 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -91,7 +91,7 @@ const char *savegameStr = "SCUMMVM_CGE";
static bool _finis = false;
int _offUseCount;
-uint16 *_intStackPtr = false;
+uint16 *_intStackPtr = NULL;
extern Dac _stdPal[58];
diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp
index 7eb147d697..e944f2e9b7 100644
--- a/engines/cge/detection.cpp
+++ b/engines/cge/detection.cpp
@@ -154,7 +154,7 @@ SaveStateList CGEMetaEngine::listSaves(const char *target) const {
SaveStateList saveList;
int slotNum = 0;
- for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); filename++) {
+ for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) {
// Obtain the last 3 digits of the filename, since they correspond to the save slot
slotNum = atoi(filename->c_str() + filename->size() - 3);
diff --git a/engines/cge/vol.cpp b/engines/cge/vol.cpp
index 9074a8f061..b3cc49495a 100644
--- a/engines/cge/vol.cpp
+++ b/engines/cge/vol.cpp
@@ -71,7 +71,7 @@ void VFile::deinit() {
}
VFile::VFile(const char *name, IOMode mode)
- : IoBuf(mode) {
+ : IoBuf(mode, NULL) {
debugC(3, kCGEDebugFile, "VFile::VFile(%s, %d)", name, mode);
if (mode == kModeRead) {
diff --git a/engines/cge/walk.cpp b/engines/cge/walk.cpp
index a9eeb6db8e..a418bfb178 100644
--- a/engines/cge/walk.cpp
+++ b/engines/cge/walk.cpp
@@ -70,7 +70,7 @@ Cluster XZ(Couple xy) {
}
Walk::Walk(CGEEngine *vm, BitmapPtr *shpl)
- : Sprite(vm, shpl), _dir(kDirNone), _tracePtr(-1), _level(0), _vm(vm) {
+ : Sprite(vm, shpl), _dir(kDirNone), _tracePtr(-1), _level(0), _target(-1, -1), _vm(vm) {
}
diff --git a/engines/cge/walk.h b/engines/cge/walk.h
index 115cb4924a..8327c901b6 100644
--- a/engines/cge/walk.h
+++ b/engines/cge/walk.h
@@ -49,7 +49,6 @@ protected:
signed char _a;
signed char _b;
public:
- Couple() { }
Couple(const signed char a, const signed char b) : _a(a), _b(b) { }
Couple operator + (Couple c) {
return Couple(_a + c._a, _b + c._b);
@@ -91,8 +90,8 @@ public:
static void init(CGEEngine *vm);
public:
uint8 &cell();
- Cluster() : Couple() { }
Cluster(int a, int b) : Couple(a, b) { }
+ Cluster() : Couple (-1, -1) { }
bool chkBar() const;
bool isValid() const;