Q-W2v review follow-ups: golden full-blob fixture test, dead-local cleanup, bool-guard static_assert, explicit VelocityCurve qualification
This commit is contained in:
@@ -191,7 +191,7 @@ void readZonesPayload(ByteReader& r, PerformanceMap& map, double projectRate) {
|
||||
const double amp = bitsToDouble(r.u64());
|
||||
pts.push_back(VelocityPoint{vel, amp});
|
||||
}
|
||||
if (r.ok) z.velocityCurve = reasampler::VelocityCurve::fromPoints(std::move(pts));
|
||||
if (r.ok) z.velocityCurve = reasampler::instrument::engine::VelocityCurve::fromPoints(std::move(pts));
|
||||
}
|
||||
// Payload versions 4 (branch-only frames tail, never shipped) and any unknown pv leave the
|
||||
// seconds product defaults on z.play — a v4 blob cannot exist outside this branch.
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace reasampler::wire {
|
||||
// (cast at the call site, the established idiom: u32 for int, u64 for int64).
|
||||
template <class T>
|
||||
inline void putLE(std::vector<std::uint8_t>& out, T v) {
|
||||
static_assert(std::is_unsigned_v<T>, "putLE takes the unsigned wire image");
|
||||
static_assert(std::is_unsigned_v<T> && !std::is_same_v<T, bool>, "putLE takes the unsigned wire image");
|
||||
for (std::size_t b = 0; b < sizeof(T); ++b) {
|
||||
out.push_back(static_cast<std::uint8_t>((v >> (b * 8)) & 0xFF));
|
||||
}
|
||||
|
||||
@@ -205,7 +205,6 @@ void ReaSamplerEditor::mouseDownZone(int w, int h, int x, int y) {
|
||||
const Rect back = zoneBackRect(w, h);
|
||||
if (contains(back, x, y)) { view_ = View::kSample; invalidate(); return; }
|
||||
const Rect content = zoneContentArea(w, h);
|
||||
const int pad = 8;
|
||||
Rect addR = zoneAddRect(content);
|
||||
if (contains(addR, x, y)) {
|
||||
// Add a narrow default zone for the picked capture (or the first visible sample as a
|
||||
|
||||
@@ -171,7 +171,6 @@ void ReaSamplerEditor::paintZone(LICE_IBitmap* bmp, int w, int h) {
|
||||
}
|
||||
|
||||
const Rect content = zoneContentArea(w, h);
|
||||
const int pad = 8;
|
||||
|
||||
// A single "+ Add Zone" affordance at the top of the content, then the keyboard strip
|
||||
// with one bar per zone. Delete is a small × on the selected zone (keystroke also).
|
||||
|
||||
Reference in New Issue
Block a user