refactor(mining): extract the Controls/CPU-grid card into mining_controls.{h,cpp} (audit #10, slice 3)
Third and largest slice of decomposing mining_tab.cpp. The ~843-line "Controls" card (CPU-core grid + drag-to-select, mining start/stop button, benchmark + miner-update controls) is moved verbatim into RenderMiningControls(). mining_tab.cpp is now 839 lines (was 2628 originally). The most coupled section, so mutated state is passed BY REFERENCE — the benchmark (ThreadBenchmark&), selected thread count (int&), and drag state (bool&/int&) — with local reference aliases so the body stays byte-identical and interactions (drag, benchmark, start/stop) behave exactly as before. Read-only context is passed by value/const; the compiler verified const-correctness. Local statics inside the block moved with it. Verified: full-node + Windows + lite build, tests, hygiene, no startup crash. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -444,6 +444,7 @@ set(APP_SOURCES
|
||||
src/ui/windows/mining_tab.cpp
|
||||
src/ui/windows/mining_earnings.cpp
|
||||
src/ui/windows/mining_stats.cpp
|
||||
src/ui/windows/mining_controls.cpp
|
||||
src/ui/windows/mining_benchmark.cpp
|
||||
src/ui/windows/mining_pool_panel.cpp
|
||||
src/ui/windows/mining_tab_helpers.cpp
|
||||
|
||||
Reference in New Issue
Block a user