mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-11 03:23:51 +00:00
64 sites in cli_gen_mesh.cpp open-coded the same 4-line
"strip .wom suffix from base path if user typed it" pattern:
if (womBase.size() >= 4 &&
womBase.substr(womBase.size() - 4) == ".wom") {
womBase = womBase.substr(0, womBase.size() - 4);
}
Hoist into cli_box_emitter.hpp as inline stripExt(string&,
const char*). Generic on the suffix string so future callers
can use it for ".wob" / ".woc" / ".png" too — uses
string::compare instead of substr to avoid the temporary
allocation the original did per check.
Each call site collapses to a single line:
stripExt(womBase, ".wom");
cli_gen_mesh.cpp drops by ~96 lines. Output bytes verified
identical: firepit surface area 2.1100 m² unchanged.
|
||
|---|---|---|
| .. | ||
| asset_extract | ||
| auth_login_probe | ||
| auth_probe | ||
| blp_convert | ||
| dbc_to_csv | ||
| editor | ||
| asset_pipeline_gui.py | ||
| backup_assets.sh | ||
| diff_classic_turtle_opcodes.py | ||
| gen_opcode_registry.py | ||
| generate_ffx_sdk_vk_permutations.sh | ||
| m2_viewer.py | ||
| opcode_map_utils.py | ||
| validate_opcode_maps.py | ||