diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2019-04-26 20:22:06 +0100 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-04-29 17:46:28 +0100 |
commit | 3299d6540be33449d3a4eebc7de69c1f57993d98 (patch) | |
tree | 21c7ac80a28fd0ad24194acf2893784f69970e6e /src | |
parent | 9da1c5bb0bdb9e09fb0bd5ed69ffa1db85ab5c09 (diff) | |
download | openttd-3299d6540be33449d3a4eebc7de69c1f57993d98.tar.xz |
Cleanup: Delete GetSavegameType function since it's been commented out since 2005
Diffstat (limited to 'src')
-rw-r--r-- | src/saveload/saveload.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index d7ec59d6f..83685b46b 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -2887,36 +2887,3 @@ void FileToSaveLoad::SetTitle(const char *title) { strecpy(this->title, title, lastof(this->title)); } - -#if 0 -/** - * Function to get the type of the savegame by looking at the file header. - * NOTICE: Not used right now, but could be used if extensions of savegames are garbled - * @param file Savegame to be checked - * @return SL_OLD_LOAD or SL_LOAD of the file - */ -int GetSavegameType(char *file) -{ - const SaveLoadFormat *fmt; - uint32 hdr; - FILE *f; - int mode = SL_OLD_LOAD; - - f = fopen(file, "rb"); - if (fread(&hdr, sizeof(hdr), 1, f) != 1) { - DEBUG(sl, 0, "Savegame is obsolete or invalid format"); - mode = SL_LOAD; // don't try to get filename, just show name as it is written - } else { - /* see if we have any loader for this type. */ - for (fmt = _saveload_formats; fmt != endof(_saveload_formats); fmt++) { - if (fmt->tag == hdr) { - mode = SL_LOAD; // new type of savegame - break; - } - } - } - - fclose(f); - return mode; -} -#endif |