diff options
author | rubidium <rubidium@openttd.org> | 2009-03-04 00:13:52 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-03-04 00:13:52 +0000 |
commit | 908e850b5aafae69fe9da04555ae8aca6682f7e5 (patch) | |
tree | 92fb15de26bbc0324614d859746420224d100181 | |
parent | f1a96c557726899caea40b94c8e3a8d168c98788 (diff) | |
download | openttd-908e850b5aafae69fe9da04555ae8aca6682f7e5.tar.xz |
(svn r15605) -Codechange: constify a function
-rw-r--r-- | src/fios.cpp | 2 | ||||
-rw-r--r-- | src/fios.h | 2 | ||||
-rw-r--r-- | src/misc_gui.cpp | 2 | ||||
-rw-r--r-- | src/network/network_gui.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/fios.cpp b/src/fios.cpp index 28d09a2a0..cdab45635 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -84,7 +84,7 @@ StringID FiosGetDescText(const char **path, uint64 *total_free) /* Browse to a new path based on the passed FiosItem struct * @param *item FiosItem object telling us what to do * @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; diff --git a/src/fios.h b/src/fios.h index 13c8bb295..f119dd75c 100644 --- a/src/fios.h +++ b/src/fios.h @@ -98,7 +98,7 @@ void FiosGetHeightmapList(SaveLoadDialogMode mode); /* Free the list of savegames */ void FiosFreeSavegameList(); /* 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 */ StringID FiosGetDescText(const char **path, uint64 *total_free); /* Delete a name */ diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 08952adea..ce7215c6e 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -1596,7 +1596,7 @@ public: const FiosItem *file = _fios_items.Get(y); - char *name = FiosBrowseTo(file); + const char *name = FiosBrowseTo(file); if (name != NULL) { if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) { _switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_SCENARIO : SM_LOAD; diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 814ace117..4f7bd5832 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -1012,7 +1012,7 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow { if (this->map == NULL) { // start random new game ShowGenerateLandscape(); } else { // load a scenario - char *name = FiosBrowseTo(this->map); + const char *name = FiosBrowseTo(this->map); if (name != NULL) { SetFiosType(this->map->type); _file_to_saveload.filetype = FT_SCENARIO; |