aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
authorlolbot-iichan2020-01-08 03:14:22 +0300
committerFilippos Karapetis2020-01-11 18:05:39 +0200
commitb3ce06ab877ec244e27f9285be382eba615576f4 (patch)
tree1c7877bdafdd1793eb7ce8a60912eb7a74c04819 /engines/wintermute
parent7e40598f5341ac6fbafdb0895904a3f1d9b0d5ad (diff)
downloadscummvm-rg350-b3ce06ab877ec244e27f9285be382eba615576f4.tar.gz
scummvm-rg350-b3ce06ab877ec244e27f9285be382eba615576f4.tar.bz2
scummvm-rg350-b3ce06ab877ec244e27f9285be382eba615576f4.zip
WINTERMUTE: Removed pointless checks
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/base/saveload.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/engines/wintermute/base/saveload.cpp b/engines/wintermute/base/saveload.cpp
index bafe8a7a51..1549eac7a8 100644
--- a/engines/wintermute/base/saveload.cpp
+++ b/engines/wintermute/base/saveload.cpp
@@ -173,12 +173,10 @@ Common::String SaveLoad::getSaveSlotDescription(int slot) {
Common::String description;
Common::String filename = getSaveSlotFilename(slot);
BasePersistenceManager *pm = new BasePersistenceManager();
- if (pm) {
- if ((pm->initLoad(filename))) {
- description = pm->_savedDescription;
- }
- delete pm;
+ if ((pm->initLoad(filename))) {
+ description = pm->_savedDescription;
}
+ delete pm;
return description;
}
@@ -186,12 +184,10 @@ void SaveLoad::getSaveSlotTimestamp(int slot, TimeDate *time) {
memset(time, 0, sizeof(TimeDate));
Common::String filename = getSaveSlotFilename(slot);
BasePersistenceManager *pm = new BasePersistenceManager();
- if (pm) {
- if ((pm->initLoad(filename))) {
- *time = pm->getSavedTimestamp();
- }
- delete pm;
+ if ((pm->initLoad(filename))) {
+ *time = pm->getSavedTimestamp();
}
+ delete pm;
}
bool SaveLoad::isSaveSlotUsed(int slot) {