From 8fe5d9d69403bebe05e2840d5a1fcd946c49dc9b Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 15 May 2022 17:44:17 -0600 Subject: [PATCH] common: adjust formatting of usage line -remove version hash as it's printed above -rename `usage` variable to `programDescription` --- common/settings.cc | 2 +- include/common/settings.hh | 4 +++- include/light/light.hh | 2 +- include/qbsp/qbsp.hh | 2 +- include/vis/vis.hh | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/common/settings.cc b/common/settings.cc index 2d5f4349..3eb5f7be 100644 --- a/common/settings.cc +++ b/common/settings.cc @@ -67,7 +67,7 @@ void setting_container::copyFrom(const setting_container& other) void setting_container::printHelp() { - fmt::print("{} ({})usage: {} [-help/-h/-?] [-options] {}\n\n", usage, stringify(ERICWTOOLS_VERSION), programName, remainderName); + fmt::print("{}usage: {} [-help/-h/-?] [-options] {}\n\n", programDescription, programName, remainderName); for (auto grouped : grouped()) { if (grouped.first) { diff --git a/include/common/settings.hh b/include/common/settings.hh index e6e21435..5ef4c8c8 100644 --- a/include/common/settings.hh +++ b/include/common/settings.hh @@ -723,7 +723,9 @@ class setting_container std::map, less> _groupedSettings; public: - std::string programName, remainderName = "filename", usage; + std::string programName; + std::string remainderName = "filename"; + std::string programDescription; inline setting_container() {} diff --git a/include/light/light.hh b/include/light/light.hh index 9cec2044..e4c215fd 100644 --- a/include/light/light.hh +++ b/include/light/light.hh @@ -500,7 +500,7 @@ public: void setParameters(int argc, const char **argv) override { common_settings::setParameters(argc, argv); - usage = "light compiles lightmap data for BSPs\n\n"; + programDescription = "light compiles lightmap data for BSPs\n\n"; remainderName = "mapname.bsp"; } diff --git a/include/qbsp/qbsp.hh b/include/qbsp/qbsp.hh index b9b60c90..a9b7d893 100644 --- a/include/qbsp/qbsp.hh +++ b/include/qbsp/qbsp.hh @@ -228,7 +228,7 @@ public: void setParameters(int argc, const char **argv) override { common_settings::setParameters(argc, argv); - usage = "qbsp performs geometric level processing of Quake .MAP files to create\nQuake .BSP files.\n\n"; + programDescription = "qbsp performs geometric level processing of Quake .MAP files to create\nQuake .BSP files.\n\n"; remainderName = "sourcefile.map [destfile.bsp]"; } void initialize(int argc, const char **argv) override; diff --git a/include/vis/vis.hh b/include/vis/vis.hh index 2e85986c..5b5855fa 100644 --- a/include/vis/vis.hh +++ b/include/vis/vis.hh @@ -235,7 +235,7 @@ public: void setParameters(int argc, const char **argv) override { common_settings::setParameters(argc, argv); - usage = "vis calculates the visibility (and hearability) sets for \n.BSP files.\n\n"; + programDescription = "vis calculates the visibility (and hearability) sets for \n.BSP files.\n\n"; remainderName = "mapname.bsp"; } void initialize(int argc, const char **argv) override;