From 8754d705a1bd5c791175f7ed9d17bab730cb94c3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Nov 2021 08:56:28 +0100 Subject: [PATCH] CommandLine: rename struct options --- src/CommandLine.cxx | 2 +- src/CommandLine.hxx | 4 ++-- src/Main.cxx | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/CommandLine.cxx b/src/CommandLine.cxx index eb47df39b..11827010a 100644 --- a/src/CommandLine.cxx +++ b/src/CommandLine.cxx @@ -334,7 +334,7 @@ bool ConfigLoader::TryFile(const AllocatedPath &base_path, Path path) } void -ParseCommandLine(int argc, char **argv, struct options &options, +ParseCommandLine(int argc, char **argv, CommandLineOptions &options, ConfigData &config) { bool use_config_file = true; diff --git a/src/CommandLine.hxx b/src/CommandLine.hxx index 744341299..3f4f2c78e 100644 --- a/src/CommandLine.hxx +++ b/src/CommandLine.hxx @@ -22,7 +22,7 @@ struct ConfigData; -struct options { +struct CommandLineOptions { bool kill = false; bool daemon = true; @@ -35,7 +35,7 @@ struct options { }; void -ParseCommandLine(int argc, char **argv, struct options &options, +ParseCommandLine(int argc, char **argv, CommandLineOptions &options, ConfigData &config); #endif diff --git a/src/Main.cxx b/src/Main.cxx index 61bbf1f8b..84e418aaf 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -142,7 +142,7 @@ struct Config { #ifdef ENABLE_DAEMON static void -glue_daemonize_init(const struct options &options, +glue_daemonize_init(const CommandLineOptions &options, const ConfigData &config) { daemonize_init(config.GetString(ConfigOption::USER), @@ -361,7 +361,8 @@ Instance::BeginShutdownPartitions() noexcept } static inline void -MainConfigured(const struct options &options, const ConfigData &raw_config) +MainConfigured(const CommandLineOptions &options, + const ConfigData &raw_config) { #ifdef ENABLE_DAEMON daemonize_close_stdin(); @@ -582,7 +583,7 @@ MainConfigured(const struct options &options, const ConfigData &raw_config) static void AndroidMain() { - struct options options; + CommandLineOptions options; ConfigData raw_config; const auto sdcard = Environment::getExternalStorageDirectory(); @@ -642,7 +643,7 @@ Java_org_musicpd_Bridge_pause(JNIEnv *, jclass) static inline void MainOrThrow(int argc, char *argv[]) { - struct options options; + CommandLineOptions options; ConfigData raw_config; ParseCommandLine(argc, argv, options, raw_config);