specifics are brittle

This commit is contained in:
Charles J. Cliffe
2026-07-24 00:17:08 -04:00
parent 23a22b7419
commit cf16e874c1
5 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -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 |
+1 -1
View File
@@ -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 |
|------|---------|--------|
+1 -1
View File
@@ -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<wxGLContextAttrs>` 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
+9 -9
View File
@@ -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
+1 -1
View File
@@ -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)