aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins
diff options
context:
space:
mode:
authorTorbjörn Andersson2013-06-26 21:33:30 +0200
committerTorbjörn Andersson2013-06-26 21:33:30 +0200
commit6716fa39a6fb2a3925576288c256688c5aadd7e9 (patch)
treed500d02e4f8ca33ce6cd97f9ad8e333a676fb03d /engines/hopkins
parent63c462efcef09dabf70f8b8ffb6117e23614b122 (diff)
downloadscummvm-rg350-6716fa39a6fb2a3925576288c256688c5aadd7e9.tar.gz
scummvm-rg350-6716fa39a6fb2a3925576288c256688c5aadd7e9.tar.bz2
scummvm-rg350-6716fa39a6fb2a3925576288c256688c5aadd7e9.zip
HOPKINS: Change some variable names for consistency
This silences a GCC warning about a 'saveFile' variable shadowing a saveFile() method.
Diffstat (limited to 'engines/hopkins')
-rw-r--r--engines/hopkins/saveload.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/engines/hopkins/saveload.cpp b/engines/hopkins/saveload.cpp
index fd36480324..98fb15046e 100644
--- a/engines/hopkins/saveload.cpp
+++ b/engines/hopkins/saveload.cpp
@@ -43,12 +43,12 @@ SaveLoadManager::SaveLoadManager(HopkinsEngine *vm) {
}
bool SaveLoadManager::save(const Common::String &file, const void *buf, size_t n) {
- Common::OutSaveFile *f = g_system->getSavefileManager()->openForSaving(file);
+ Common::OutSaveFile *savefile = g_system->getSavefileManager()->openForSaving(file);
- if (f) {
- size_t bytesWritten = f->write(buf, n);
- f->finalize();
- delete f;
+ if (savefile) {
+ size_t bytesWritten = savefile->write(buf, n);
+ savefile->finalize();
+ delete savefile;
return bytesWritten == n;
} else
@@ -69,13 +69,13 @@ void SaveLoadManager::initSaves() {
}
void SaveLoadManager::load(const Common::String &file, byte *buf) {
- Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(file);
- if (f == NULL)
- error("Error openinig file - %s", file.c_str());
+ Common::InSaveFile *savefile = g_system->getSavefileManager()->openForLoading(file);
+ if (savefile == NULL)
+ error("Error opening file - %s", file.c_str());
- int32 filesize = f->size();
- f->read(buf, filesize);
- delete f;
+ int32 filesize = savefile->size();
+ savefile->read(buf, filesize);
+ delete savefile;
}
bool SaveLoadManager::readSavegameHeader(Common::InSaveFile *in, hopkinsSavegameHeader &header) {
@@ -215,13 +215,13 @@ Common::Error SaveLoadManager::loadGame(int slot) {
bool SaveLoadManager::readSavegameHeader(int slot, hopkinsSavegameHeader &header) {
// Try and open the save file for reading
- Common::InSaveFile *saveFile = g_system->getSavefileManager()->openForLoading(
+ Common::InSaveFile *savefile = g_system->getSavefileManager()->openForLoading(
_vm->generateSaveName(slot));
- if (!saveFile)
+ if (!savefile)
return false;
- bool result = readSavegameHeader(saveFile, header);
- delete saveFile;
+ bool result = readSavegameHeader(savefile, header);
+ delete savefile;
return result;
}