1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 12:39:11 +00:00

Codechange: use designated initializers for OptionData and pass as span

This commit is contained in:
Rubidium
2024-04-10 21:49:39 +02:00
committed by rubidium42
parent 4f2412a272
commit e8a56db21d
5 changed files with 49 additions and 114 deletions

View File

@@ -385,12 +385,11 @@ static bool CompareFiles(const char *n1, const char *n2)
/** Options of settingsgen. */
static const OptionData _opts[] = {
GETOPT_NOVAL( 'h', "--help"),
GETOPT_GENERAL('h', '?', nullptr, ODF_NO_VALUE),
GETOPT_VALUE( 'o', "--output"),
GETOPT_VALUE( 'b', "--before"),
GETOPT_VALUE( 'a', "--after"),
GETOPT_END(),
{ .type = ODF_NO_VALUE, .id = 'h', .shortname = 'h', .longname = "--help" },
{ .type = ODF_NO_VALUE, .id = 'h', .shortname = '?' },
{ .type = ODF_HAS_VALUE, .id = 'o', .shortname = 'o', .longname = "--output" },
{ .type = ODF_HAS_VALUE, .id = 'b', .shortname = 'b', .longname = "--before" },
{ .type = ODF_HAS_VALUE, .id = 'a', .shortname = 'a', .longname = "--after" },
};
/**