aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-12 14:30:22 -0700
committerJohannes Schickel2013-08-12 14:30:22 -0700
commit818d3981e32b83e2531f63bb603b4c48cba9b412 (patch)
tree47847bbcecae06595327e8c3aec891607d9d9104 /gui
parentbb7e95f1ad7f432fd2daa90200f750b37c5c6c2e (diff)
parentf7d3b0671124dba28541c56fb74edd535fdad386 (diff)
downloadscummvm-rg350-818d3981e32b83e2531f63bb603b4c48cba9b412.tar.gz
scummvm-rg350-818d3981e32b83e2531f63bb603b4c48cba9b412.tar.bz2
scummvm-rg350-818d3981e32b83e2531f63bb603b4c48cba9b412.zip
Merge pull request #377 from lordhoto/config-manager-cleanup
Config Manager Cleanup
Diffstat (limited to 'gui')
-rw-r--r--gui/EventRecorder.cpp8
-rw-r--r--gui/EventRecorder.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/gui/EventRecorder.cpp b/gui/EventRecorder.cpp
index 4bf5832864..21152dd079 100644
--- a/gui/EventRecorder.cpp
+++ b/gui/EventRecorder.cpp
@@ -372,8 +372,8 @@ SdlMixerManager *EventRecorder::getMixerManager() {
}
}
-void EventRecorder::getConfigFromDomain(Common::ConfigManager::Domain *domain) {
- for (Common::ConfigManager::Domain::iterator entry = domain->begin(); entry!= domain->end(); ++entry) {
+void EventRecorder::getConfigFromDomain(const Common::ConfigManager::Domain *domain) {
+ for (Common::ConfigManager::Domain::const_iterator entry = domain->begin(); entry!= domain->end(); ++entry) {
_playbackFile->getHeader().settingsRecords[entry->_key] = entry->_value;
}
}
@@ -386,7 +386,7 @@ void EventRecorder::getConfig() {
void EventRecorder::applyPlaybackSettings() {
- for (Common::StringMap::iterator i = _playbackFile->getHeader().settingsRecords.begin(); i != _playbackFile->getHeader().settingsRecords.end(); ++i) {
+ for (Common::StringMap::const_iterator i = _playbackFile->getHeader().settingsRecords.begin(); i != _playbackFile->getHeader().settingsRecords.end(); ++i) {
Common::String currentValue = ConfMan.get(i->_key);
if (currentValue != i->_value) {
ConfMan.set(i->_key, i->_value, ConfMan.kTransientDomain);
@@ -400,7 +400,7 @@ void EventRecorder::applyPlaybackSettings() {
}
void EventRecorder::removeDifferentEntriesInDomain(Common::ConfigManager::Domain *domain) {
- for (Common::ConfigManager::Domain::iterator entry = domain->begin(); entry!= domain->end(); ++entry) {
+ for (Common::ConfigManager::Domain::const_iterator entry = domain->begin(); entry!= domain->end(); ++entry) {
if (_playbackFile->getHeader().settingsRecords.find(entry->_key) == _playbackFile->getHeader().settingsRecords.end()) {
debugC(1, kDebugLevelEventRec, "playback:action=\"Apply settings\" checksettings:key=%s storedvalue=%s currentvalue="" result=different", entry->_key.c_str(), entry->_value.c_str());
domain->erase(entry->_key);
diff --git a/gui/EventRecorder.h b/gui/EventRecorder.h
index 68ffe16fbc..b2a549ece8 100644
--- a/gui/EventRecorder.h
+++ b/gui/EventRecorder.h
@@ -199,7 +199,7 @@ private:
void setFileHeader();
void setGameMd5(const ADGameDescription *gameDesc);
void getConfig();
- void getConfigFromDomain(Common::ConfigManager::Domain *domain);
+ void getConfigFromDomain(const Common::ConfigManager::Domain *domain);
void removeDifferentEntriesInDomain(Common::ConfigManager::Domain *domain);
void applyPlaybackSettings();