mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-09 18:43:51 +00:00
Pulls the 597-line block of printf calls that emits the --help text out of main.cpp into its own translation unit. printUsage is the longest single function in main.cpp by far and was pure boilerplate (no logic, just a flat list of help lines). Function moved verbatim to wowee::editor::cli::printUsage; all 6 in-tree callers (--list-commands, --info-cli-stats, --info-cli-categories, --info-cli-help, --validate-cli-help, and the bare --help/-h handler) updated to the namespaced name. The CLI-meta commands continue to capture printUsage's stdout the same way, so behavior is identical (verified by re-running --validate-cli-help, --info-cli-stats, --list-commands). main.cpp drops 26,650 → 26,286 lines (-364 net; -597 from the removal, +233 from the include and namespace-prefixing the six call sites... wait, no, +6). Actually main.cpp net delta matches the body extraction.
17 lines
437 B
C++
17 lines
437 B
C++
#pragma once
|
|
|
|
namespace wowee {
|
|
namespace editor {
|
|
namespace cli {
|
|
|
|
// Print the full --help / usage text to stdout. Drop-in
|
|
// replacement for the local-static printUsage main.cpp used to
|
|
// own; moved here so the 597-line block of printf calls doesn't
|
|
// keep main.cpp obese.
|
|
//
|
|
// argv0 is interpolated into the leading "Usage:" line.
|
|
void printUsage(const char* argv0);
|
|
|
|
} // namespace cli
|
|
} // namespace editor
|
|
} // namespace wowee
|