Refactor clear_all resets and file-local helper layout - #245
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
clear_allfor enums and aggregates; convert multi-field reset sites across shape, sketch, and GUI._names, top forward decls, and bottom definitions (GUI, shape/sketch,utl_*,main).docs/ezycad_code_style.mdandclear_allcoverage insrc/doc/utility.md.table_row_input_double_.Closes #244
Test plan
EzyCad/EzyCad_tests127/127)clear_allresets (move/rotate/extrude/cyl-align)Notes
scr_*.cpp) left alone on purpose.Note
Low Risk
Refactor and style alignment with no intentional behavior change;
clear_allon enums/aggregates is the main semantic extension and is covered by existing tests per the PR test plan.Overview
clear_allnow value-initializes enums and aggregates (in addition to handles viaNullify, optionals, containers, etc.), with docs updated inutility.mdandutl.h/utl.inl. Many multi-field reset sites in GUI, OCCT view, and shape/sketch tools (move,rotate,extrude,cyl_align, cross-section, dims, underlay, …) are consolidated toclear_all(...)instead of hand-writtenNullify()/ per-field clears.Shp_cyl_align::reset()delegates tobegin();Shp_rotategainsclear_rotation_vis_()for AIS cleanup.Code organization follows the documented reader-first / helpers-at-bottom pattern: anonymous-namespace helpers get trailing
_names, forward declarations at the top, definitions at the bottom (gui.cpplog helpers,gui_settings.cppImGui JSON/UI,gui_occt_view.cppSTEP import and grid helpers,utl_cad_file_info.cpp,main.cppCLI parse, and similar acrossshp_*/skt_*/utl_*).docs/ezycad_code_style.mdspells out that convention for private methods and file-local helpers.gui_add.cppreplaces repeated ImGui table rows withtable_row_input_double_for all add-primitive dialogs. Minor formatting-only tweaks elsewhere (gui.halignment, planar-face brace cleanup).Reviewed by Cursor Bugbot for commit 4260889. Bugbot is set up for automated code reviews on this repo. Configure here.