From cf16e874c1deb8eb279aa8ba92b499900caba118 Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" <247927+cjcliffe@users.noreply.github.com> Date: Fri, 24 Jul 2026 00:17:08 -0400 Subject: [PATCH] specifics are brittle --- docs/RECOMMENDATIONS.md | 2 +- docs/plans/resolve-todos.md | 2 +- docs/plans/smart-pointers.md | 2 +- docs/plans/split-appframe.md | 18 +++++++++--------- docs/plans/update-vendored-deps.md | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/RECOMMENDATIONS.md b/docs/RECOMMENDATIONS.md index aacd2de..460caea 100644 --- a/docs/RECOMMENDATIONS.md +++ b/docs/RECOMMENDATIONS.md @@ -16,7 +16,7 @@ | Issue | Severity | |-------|----------| | **Zero test coverage** — no test framework, no test files, CI only builds | Critical | -| **Monolithic files** — `AppFrame.cpp` is ~3,200 lines | High | +| **Monolithic files** — `AppFrame.cpp` is ~2,700 lines | High | | **Memory safety** — raw `new`/`delete` for threads, `reinterpret_cast` type punning in DataTree, suppressed MSVC C4996 warnings | High | | **Outdated CMake** — targets 2.8.12, uses `-std=c++0x` draft flag, deprecated patterns | Medium | | **Incomplete .gitignore** — missing IDE, OS, and build artifact patterns | Medium | diff --git a/docs/plans/resolve-todos.md b/docs/plans/resolve-todos.md index b79de5f..890c5fe 100644 --- a/docs/plans/resolve-todos.md +++ b/docs/plans/resolve-todos.md @@ -4,7 +4,7 @@ See also: [RECOMMENDATIONS.md](../RECOMMENDATIONS.md) | [PLAN.md](../PLAN.md) ## Current State -18 TODO/FIXME markers in project source code: +Multiple TODO/FIXME markers in project source code: | File | Comment | Action | |------|---------|--------| diff --git a/docs/plans/smart-pointers.md b/docs/plans/smart-pointers.md index 43a42a2..c15d0bf 100644 --- a/docs/plans/smart-pointers.md +++ b/docs/plans/smart-pointers.md @@ -51,7 +51,7 @@ Smart pointers handle cleanup automatically. Remove all manual `delete` operatio ### Phase 4: Fix memory leaks - `m_glContextAttributes`: wrap in `std::unique_ptr` or delete in `OnExit()`. -- `confName`/`modPath` (lines 562, 579): change from raw `new wxString` to stack-allocated `wxString` or `std::unique_ptr`. +- `confName`/`modPath`: change from raw `new wxString` to stack-allocated `wxString` or `std::unique_ptr`. ### Phase 5: Fix t_SDREnum overwrite diff --git a/docs/plans/split-appframe.md b/docs/plans/split-appframe.md index 5ed7e87..8291010 100644 --- a/docs/plans/split-appframe.md +++ b/docs/plans/split-appframe.md @@ -4,21 +4,21 @@ See also: [RECOMMENDATIONS.md](../RECOMMENDATIONS.md) | [PLAN.md](../PLAN.md) | ## Current State -- `AppFrame.cpp`: 3,202 lines in a single file -- `AppFrame.h`: 389 lines +- `AppFrame.cpp`: ~2,700 lines in a single file +- `AppFrame.h`: multiple hundreds of lines - Handles menus, keyboard, device management, UI layout, hamlib, sessions, idle handlers, and accessors ## Implementation Plan Split into 5 compilation units (same class, multiple `.cpp` files — no header changes needed): -| New File | Content | ~Lines | -|----------|---------|--------| -| `AppFrame.cpp` (kept) | Constructor, destructor, init*, make* factory methods, OnClose, OnNewWindow, splitter events, accessors, utilities | ~1,030 | +| New File | Content | Est. Lines | +|----------|---------|------------| +| `AppFrame.cpp` (kept) | Constructor, destructor, init*, make* factory methods, OnClose, OnNewWindow, splitter events, accessors, utilities | ~1,000 | | `AppFrame_Menus.cpp` | `OnMenu`, all 19 `actionOnMenu*` methods, `makeFileMenu`, `makeDisplayMenu`, `makeAudioSampleRateMenu`, `makeRecordingMenu`, `updateRecordingMenu`, `getSettingsLabel` | ~900 | -| `AppFrame_Handlers.cpp` | `OnIdle`, all `handle*` methods, `handleUpdateDeviceParams` | ~710 | -| `AppFrame_Keyboard.cpp` | `OnGlobalKeyDown`, `OnGlobalKeyUp`, `gkNudge`, `toggleActiveDemodRecording`, `toggleAllActiveDemodRecording` | ~334 | -| `AppFrame_Hamlib.cpp` | All `#ifdef USE_HAMLIB` methods: `makeRigMenu`, `enableRig`, `disableRig`, `setRigControlPort`, `dismissRigControlPortDialog`, `actionOnMenuRig`, `handleRigMenu` | ~301 | +| `AppFrame_Handlers.cpp` | `OnIdle`, all `handle*` methods, `handleUpdateDeviceParams` | ~700 | +| `AppFrame_Keyboard.cpp` | `OnGlobalKeyDown`, `OnGlobalKeyUp`, `gkNudge`, `toggleActiveDemodRecording`, `toggleAllActiveDemodRecording` | ~330 | +| `AppFrame_Hamlib.cpp` | All `#ifdef USE_HAMLIB` methods: `makeRigMenu`, `enableRig`, `disableRig`, `setRigControlPort`, `dismissRigControlPortDialog`, `actionOnMenuRig`, `handleRigMenu` | ~300 | ### Steps @@ -33,7 +33,7 @@ Split into 5 compilation units (same class, multiple `.cpp` files — no header - `cmake --build build` succeeds with the 4 new `.cpp` files in the source list. - Application starts and all menu items, keyboard shortcuts, idle handlers, and hamlib functions work identically. - No linker errors (each method appears in exactly one `.cpp` file). -- `AppFrame.cpp` is reduced to approximately 1,030 lines. +- `AppFrame.cpp` is significantly reduced in size. ## Files to Create/Modify diff --git a/docs/plans/update-vendored-deps.md b/docs/plans/update-vendored-deps.md index 17c2aaf..c168a17 100644 --- a/docs/plans/update-vendored-deps.md +++ b/docs/plans/update-vendored-deps.md @@ -84,7 +84,7 @@ This is a large, risky change. Recommend doing it incrementally: 6. **wglext** (`external/wglext/`): Replace with regenerated header or inline definitions. **Current usage** (narrowly scoped): - - `src/util/GLExt.h` includes `wglext.h` (line 11-13) + - `src/util/GLExt.h` includes `wglext.h` (near top of file) - `src/util/GLExt.cpp` defines three function pointers: - `wglGetExtensionsStringEXT` (declared but unused — `GLExtSupported()` uses `glGetString()` instead) - `wglSwapIntervalEXT` (loaded via `wglGetProcAddress`, used for VSync)