mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-02 15:16:46 +00:00
GUI: Use Domain::const_iterator in EventRecorder code when possible.
This commit is contained in:
parent
fffb2ee3ff
commit
11eb168582
@ -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);
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user