[Scummvm-cvs-logs] scummvm master -> 9b8afdab0ea366de0fe1125f86405df232688dfa

lordhoto lordhoto at gmail.com
Thu Aug 1 03:40:58 CEST 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9b8afdab0e HOPKINS: Slight cleanup.


Commit: 9b8afdab0ea366de0fe1125f86405df232688dfa
    https://github.com/scummvm/scummvm/commit/9b8afdab0ea366de0fe1125f86405df232688dfa
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-07-31T18:30:14-07:00

Commit Message:
HOPKINS: Slight cleanup.

This renames HopkinsEngine::targetName to HopkinsEngine::getTargetName. This
is more consistent with the name scheme of the remaining getters.

It also makes getTargetName return a const reference instead of a copy.

Changed paths:
    engines/hopkins/computer.cpp
    engines/hopkins/detection.cpp
    engines/hopkins/hopkins.h



diff --git a/engines/hopkins/computer.cpp b/engines/hopkins/computer.cpp
index 489e7e1..c09d748 100644
--- a/engines/hopkins/computer.cpp
+++ b/engines/hopkins/computer.cpp
@@ -581,8 +581,8 @@ void ComputerManager::loadHiscore() {
 	byte *ptr = _vm->_globals->allocMemory(100);
 	memset(ptr, 0, 100);
 
-	if (_vm->_saveLoad->saveExists(_vm->targetName() + "-highscore.dat"))
-		_vm->_saveLoad->load(_vm->targetName() + "-highscore.dat", ptr);
+	if (_vm->_saveLoad->saveExists(_vm->getTargetName() + "-highscore.dat"))
+		_vm->_saveLoad->load(_vm->getTargetName() + "-highscore.dat", ptr);
 
 	for (int scoreIndex = 0; scoreIndex < 6; ++scoreIndex) {
 		_score[scoreIndex]._name = "      ";
@@ -1012,7 +1012,7 @@ void ComputerManager::saveScore() {
 		ptr[curBufPtr + 15] = 0;
 	}
 
-	_vm->_saveLoad->saveFile(_vm->targetName() + "-highscore.dat", ptr, 100);
+	_vm->_saveLoad->saveFile(_vm->getTargetName() + "-highscore.dat", ptr, 100);
 	_vm->_globals->freeMemory(ptr);
 }
 
diff --git a/engines/hopkins/detection.cpp b/engines/hopkins/detection.cpp
index 45b6c2b..c617a5a 100644
--- a/engines/hopkins/detection.cpp
+++ b/engines/hopkins/detection.cpp
@@ -56,7 +56,7 @@ bool HopkinsEngine::getIsDemo() const {
 	return _gameDescription->desc.flags & ADGF_DEMO;
 }
 
-Common::String HopkinsEngine::targetName() const {
+const Common::String &HopkinsEngine::getTargetName() const {
 	return _targetName;
 }
 
diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h
index 54e7c90..d8c30e5 100644
--- a/engines/hopkins/hopkins.h
+++ b/engines/hopkins/hopkins.h
@@ -164,7 +164,7 @@ public:
 	Common::Platform getPlatform() const;
 	uint16 getVersion() const;
 	bool getIsDemo() const;
-	Common::String targetName() const;
+	const Common::String &getTargetName() const;
 
 	int getRandomNumber(int maxNumber);
 	Common::String generateSaveName(int slotNumber);






More information about the Scummvm-git-logs mailing list