aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/PalmOS/Src/base_mouse.cpp7
-rw-r--r--backends/platform/psp/powerman.cpp4
-rw-r--r--backends/platform/wii/osystem_gfx.cpp3
-rw-r--r--backends/platform/wince/CEgui/GUIElement.cpp3
-rw-r--r--backends/platform/wince/CEgui/ItemSwitch.cpp3
-rw-r--r--backends/platform/wince/missing/missing.cpp6
6 files changed, 9 insertions, 17 deletions
diff --git a/backends/platform/PalmOS/Src/base_mouse.cpp b/backends/platform/PalmOS/Src/base_mouse.cpp
index 93a1fd2209..053a0ed3a7 100644
--- a/backends/platform/PalmOS/Src/base_mouse.cpp
+++ b/backends/platform/PalmOS/Src/base_mouse.cpp
@@ -55,11 +55,8 @@ void OSystem_PalmBase::setMouseCursor(const byte *buf, uint w, uint h, int hotsp
_mouseCurState.w = w;
_mouseCurState.h = h;
- if (_mouseDataP)
- free(_mouseDataP);
-
- if (_mouseBackupP)
- free(_mouseBackupP);
+ free(_mouseDataP);
+ free(_mouseBackupP);
_mouseDataP = (byte *)malloc(w * h);
_mouseBackupP = (byte *)malloc(w * h * 2); // if 16bit = *2
diff --git a/backends/platform/psp/powerman.cpp b/backends/platform/psp/powerman.cpp
index 678f3697fb..89741f3fc9 100644
--- a/backends/platform/psp/powerman.cpp
+++ b/backends/platform/psp/powerman.cpp
@@ -359,7 +359,7 @@ int PowerManager::suspend() {
// Iterate
Common::List<Suspendable *>::iterator i = _suspendList.begin();
- for (; i != _suspendList.end(); i++) {
+ for (; i != _suspendList.end(); ++i) {
(*i)->suspend();
}
@@ -402,7 +402,7 @@ int PowerManager::resume() {
// Iterate
Common::List<Suspendable *>::iterator i = _suspendList.begin();
- for (; i != _suspendList.end(); i++) {
+ for (; i != _suspendList.end(); ++i) {
(*i)->resume();
}
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index 13ad3267bf..f1d3e255e2 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -258,8 +258,7 @@ void OSystem_Wii::initSize(uint width, uint height,
}
if (update) {
- if (_gamePixels)
- free(_gamePixels);
+ free(_gamePixels);
tex_format = GFX_TF_PALETTE_RGB565;
diff --git a/backends/platform/wince/CEgui/GUIElement.cpp b/backends/platform/wince/CEgui/GUIElement.cpp
index a37182e69d..23e7843de1 100644
--- a/backends/platform/wince/CEgui/GUIElement.cpp
+++ b/backends/platform/wince/CEgui/GUIElement.cpp
@@ -120,8 +120,7 @@ namespace CEGUI {
}
GUIElement::~GUIElement() {
- if (_background)
- delete _background;
+ delete _background;
}
}
diff --git a/backends/platform/wince/CEgui/ItemSwitch.cpp b/backends/platform/wince/CEgui/ItemSwitch.cpp
index 445b3bb69b..8e0121f7c4 100644
--- a/backends/platform/wince/CEgui/ItemSwitch.cpp
+++ b/backends/platform/wince/CEgui/ItemSwitch.cpp
@@ -57,8 +57,7 @@ namespace CEGUI {
}
ItemSwitch::~ItemSwitch() {
- if (_backgroundFalse)
- delete _backgroundFalse;
+ delete _backgroundFalse;
}
bool ItemSwitch::action(int x, int y, bool pushed) {
diff --git a/backends/platform/wince/missing/missing.cpp b/backends/platform/wince/missing/missing.cpp
index 2d9765b0f2..532f1d2e89 100644
--- a/backends/platform/wince/missing/missing.cpp
+++ b/backends/platform/wince/missing/missing.cpp
@@ -288,8 +288,7 @@ struct dirent* readdir(DIR* dir) {
}
WideCharToMultiByte(CP_ACP, 0, wfd.cFileName, -1, nameFound, MAX_PATH, NULL, NULL);
- if (dir->dd_dir.d_name)
- free(dir->dd_dir.d_name);
+ free(dir->dd_dir.d_name);
dir->dd_dir.d_name = strdup(nameFound);
dir->dd_dir.d_namlen = strlen(nameFound);
@@ -307,8 +306,7 @@ int closedir(DIR* dir) {
if (dir->dd_handle)
FindClose((HANDLE)dir->dd_handle);
- if (dir->dd_dir.d_name)
- free(dir->dd_dir.d_name);
+ free(dir->dd_dir.d_name);
free(dir);
return 1;
}