diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-13 10:43:58 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-13 10:54:36 +0100 |
commit | 264e24ea87fb9d529f65f0e1e09fc6c3a93db3c9 (patch) | |
tree | c04b1c07cdbc6e2ee053bc11eb2635bfd8135ea4 /serialize/packbits.cpp | |
parent | eaab9a8a4537a1c4235180744aff40b201c23318 (diff) |
fix typo
Diffstat (limited to 'serialize/packbits.cpp')
-rw-r--r-- | serialize/packbits.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/serialize/packbits.cpp b/serialize/packbits.cpp index afa20d7e..4623d0d9 100644 --- a/serialize/packbits.cpp +++ b/serialize/packbits.cpp @@ -9,7 +9,7 @@ namespace { constexpr bool test1() { - constexpr size_t bits[] = { 5, 2, 1, 0 }; + constexpr size_t bits[] = { 5, 2, 1 }; constexpr size_t vals[] = { 8, 3, 1, 0 }; constexpr auto S0 = Storage<uint8_t, vals[0]>{0b10111011}; @@ -27,10 +27,10 @@ constexpr bool test1() static_assert(std::is_same_v<P2, Storage<uint8_t, vals[2]>>); static_assert(std::is_same_v<P3, Storage<uint8_t, vals[3]>>); - static_assert(S0.advance<0>() == S0.value); - static_assert(S0.advance<5>() == S1.value); - static_assert(S1.advance<2>() == S2.value); - static_assert(S2.advance<1>() == S3.value); + static_assert(S0.advance< 0>() == S0.value); + static_assert(S0.advance<bits[0]>() == S1.value); + static_assert(S1.advance<bits[1]>() == S2.value); + static_assert(S2.advance<bits[2]>() == S3.value); static_assert(S0.get<bits[0]>() == (S0.value & (1<<bits[0])-1)); static_assert(S1.get<bits[1]>() == (S1.value & (1<<bits[1])-1)); |