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:
2026-07-29 11:28:52 -04:00
parent ea86f540b8
commit f0f91f7698
5 changed files with 144 additions and 4 deletions
+1 -1
View File
@@ -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));
}