Skip to content

Commit

Permalink
Remove freeciv_datafile_version()
Browse files Browse the repository at this point in the history
It was always equal to freeciv21_version().
  • Loading branch information
lmoureaux authored and jwrober committed Feb 4, 2024
1 parent 190146f commit fbbe730
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 20 deletions.
3 changes: 1 addition & 2 deletions server/savegame/savegame3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1574,8 +1574,7 @@ static void sg_save_savefile(struct savedata *saving)
secfile_insert_str(saving->file, saving->save_reason, "savefile.reason");

// Save as accurate freeciv revision information as possible
secfile_insert_str(saving->file, freeciv_datafile_version(),
"savefile.revision");
secfile_insert_str(saving->file, freeciv21_version(), "savefile.revision");

/* Save rulesetdir at this point as this ruleset is required by this
* savefile. */
Expand Down
2 changes: 1 addition & 1 deletion tools/civmanual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static bool manual_command(struct tag_types *tag_info)

fprintf(doc, "%s", tag_info->header);
fprintf(doc, "<!-- Generated by freeciv21-manual version %s -->\n\n",
freeciv_datafile_version());
freeciv21_version());

switch (manuals) {
case MANUAL_SETTINGS:
Expand Down
2 changes: 1 addition & 1 deletion tools/ruleutil/rulesave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static struct section_file *create_ruleset_file(const char *rsname,
}

secfile_insert_str(sfile, buf, "datafile.description");
secfile_insert_str(sfile, freeciv_datafile_version(), "datafile.ruledit");
secfile_insert_str(sfile, freeciv21_version(), "datafile.ruledit");
secfile_insert_str(sfile, RULESET_CAPABILITIES, "datafile.options");
secfile_insert_int(sfile, FORMAT_VERSION, "datafile.format_version");

Expand Down
15 changes: 0 additions & 15 deletions utility/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,3 @@ const char *freeciv_name_version()

return msgbuf;
}

/**
Return version string in a format suitable to be written to created
datafiles as human readable information.
*/
const char *freeciv_datafile_version()
{
static char buf[500] = {'\0'};

if (buf[0] == '\0') {
fc_snprintf(buf, sizeof(buf), "%s", freeciv21_version());
}

return buf;
}
1 change: 0 additions & 1 deletion utility/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
// version informational strings
const char *freeciv21_version();
const char *freeciv_name_version();
const char *freeciv_datafile_version();

0 comments on commit fbbe730

Please sign in to comment.