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:
@@ -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