GUI: Let SaveLoadChooser::getResultString return a const reference.

This commit is contained in:
Johannes Schickel 2012-07-24 23:32:17 +02:00
parent bab992ab98
commit f006eddac5
2 changed files with 4 additions and 6 deletions

View File

@ -103,11 +103,9 @@ int SaveLoadChooser::runModalWithPluginAndTarget(const EnginePlugin *plugin, con
return ret;
}
Common::String SaveLoadChooser::getResultString() const {
if (_impl)
return _impl->getResultString();
else
return Common::String();
const Common::String &SaveLoadChooser::getResultString() const {
assert(_impl);
return _impl->getResultString();
}
} // End of namespace GUI

View File

@ -52,7 +52,7 @@ public:
int runModalWithCurrentTarget();
int runModalWithPluginAndTarget(const EnginePlugin *plugin, const String &target);
Common::String getResultString() const;
const Common::String &getResultString() const;
/**
* Creates a default save description for the specified slot. Depending