(svn r15605) -Codechange: constify a function

pull/155/head
rubidium 16 years ago
parent 56b6d78bf7
commit 9e3449ecc9

@ -84,7 +84,7 @@ StringID FiosGetDescText(const char **path, uint64 *total_free)
/* Browse to a new path based on the passed FiosItem struct /* Browse to a new path based on the passed FiosItem struct
* @param *item FiosItem object telling us what to do * @param *item FiosItem object telling us what to do
* @return a string if we have given a file as a target, otherwise NULL */ * @return a string if we have given a file as a target, otherwise NULL */
char *FiosBrowseTo(const FiosItem *item) const char *FiosBrowseTo(const FiosItem *item)
{ {
char *path = _fios_path; char *path = _fios_path;

@ -98,7 +98,7 @@ void FiosGetHeightmapList(SaveLoadDialogMode mode);
/* Free the list of savegames */ /* Free the list of savegames */
void FiosFreeSavegameList(); void FiosFreeSavegameList();
/* Browse to. Returns a filename w/path if we reached a file. */ /* Browse to. Returns a filename w/path if we reached a file. */
char *FiosBrowseTo(const FiosItem *item); const char *FiosBrowseTo(const FiosItem *item);
/* Return path, free space and stringID */ /* Return path, free space and stringID */
StringID FiosGetDescText(const char **path, uint64 *total_free); StringID FiosGetDescText(const char **path, uint64 *total_free);
/* Delete a name */ /* Delete a name */

@ -1596,7 +1596,7 @@ public:
const FiosItem *file = _fios_items.Get(y); const FiosItem *file = _fios_items.Get(y);
char *name = FiosBrowseTo(file); const char *name = FiosBrowseTo(file);
if (name != NULL) { if (name != NULL) {
if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) { if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) {
_switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_SCENARIO : SM_LOAD; _switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_SCENARIO : SM_LOAD;

@ -1012,7 +1012,7 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow {
if (this->map == NULL) { // start random new game if (this->map == NULL) { // start random new game
ShowGenerateLandscape(); ShowGenerateLandscape();
} else { // load a scenario } else { // load a scenario
char *name = FiosBrowseTo(this->map); const char *name = FiosBrowseTo(this->map);
if (name != NULL) { if (name != NULL) {
SetFiosType(this->map->type); SetFiosType(this->map->type);
_file_to_saveload.filetype = FT_SCENARIO; _file_to_saveload.filetype = FT_SCENARIO;

Loading…
Cancel
Save