mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 02:53:51 +00:00
refactor(editor): extract format validation into cli_format_validate.cpp
Moves the open-format validation + project-audit handlers out of main.cpp: --validate --validate-wom --validate-wob --validate-woc --validate-whm --validate-all --validate-project --validate-project-open-only --audit-project --bench-audit-project --bench-validate-project Also moves the four shared validate*Errors helpers (validateWom/ Wob/Woc/WhmErrors, ~365 lines) into the same module's anonymous namespace — they were file-scope helpers in main.cpp used only by these handlers, so co-locating eliminates the cross-TU coupling. main.cpp drops 19,446 → 18,396 lines (-1,050). Two build errors caught during extraction (wrong include path for the WHM loader header; missing #include for ContentPacker / std::set / std::map); all fixed before commit.
This commit is contained in:
parent
2d81bc9f6b
commit
b87ece2d5b
4 changed files with 1171 additions and 1054 deletions
1146
tools/editor/cli_format_validate.cpp
Normal file
1146
tools/editor/cli_format_validate.cpp
Normal file
File diff suppressed because it is too large
Load diff
20
tools/editor/cli_format_validate.hpp
Normal file
20
tools/editor/cli_format_validate.hpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
namespace wowee {
|
||||
namespace editor {
|
||||
namespace cli {
|
||||
|
||||
// Dispatch the open-format validation + project audit handlers:
|
||||
// --validate --validate-wom
|
||||
// --validate-wob --validate-woc
|
||||
// --validate-whm --validate-all
|
||||
// --validate-project --validate-project-open-only
|
||||
// --audit-project --bench-audit-project
|
||||
// --bench-validate-project
|
||||
//
|
||||
// Returns true if matched; outRc holds the exit code.
|
||||
bool handleFormatValidate(int& i, int argc, char** argv, int& outRc);
|
||||
|
||||
} // namespace cli
|
||||
} // namespace editor
|
||||
} // namespace wowee
|
||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue