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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user