Ψ-W1-T4 remediation: gate silent arrange drops, pin surface totality, hedge unverified SDK claims, close comment/exception-safety minors

This commit is contained in:
2026-08-01 20:13:17 -04:00
parent fe3ac79ab5
commit 9d10f151da
8 changed files with 110 additions and 44 deletions
+9
View File
@@ -12,6 +12,7 @@
#include "../src/core/ui/drag_out.h"
#include <cstddef>
#include <cstdio>
#include <string>
#include <vector>
@@ -43,6 +44,14 @@ static const ReaperSurface kAllSurfaces[] = {
ReaperSurface::FxEmbed, ReaperSurface::Arrange, ReaperSurface::Other,
};
// Pins kAllSurfaces against ReaperSurface::Count so a 7th surface added to the enum without a
// matching entry here fails the BUILD, not just a silently-incomplete matrix — the compiler
// alone does not enforce this (no -Wswitch/-Wall or /W4 anywhere in the build; see
// panel_drag.cpp's onLBtnUp for the same caveat on DropClass).
static_assert(sizeof(kAllSurfaces) / sizeof(kAllSurfaces[0]) ==
static_cast<std::size_t>(ReaperSurface::Count),
"kAllSurfaces must list exactly the surfaces below ReaperSurface::Count");
// A point comfortably outside the panel client rect.
static const int kOutX = 500, kOutY = 150;