File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,12 @@ namespace bitstream
2525 bool use_bits;
2626 if (Stream::writing)
2727 use_bits = difference <= Max;
28- if (!stream.serialize <bool >(use_bits))
29- return false ;
28+ BS_ASSERT (stream.template serialize <bool >(use_bits));
3029 if (use_bits)
3130 {
3231 using bounded_trait = bounded_int<uint32_t , Min, Max>;
3332
34- if (!stream.serialize <bounded_trait>(difference))
35- return false ;
33+ BS_ASSERT (stream.template serialize <bounded_trait>(difference));
3634 if (Stream::reading)
3735 current = previous + difference;
3836 previous = current;
@@ -57,8 +55,7 @@ namespace bitstream
5755 bool plus_one;
5856 if (Stream::writing)
5957 plus_one = difference == 1 ;
60- if (!stream.serialize <bool >(plus_one))
61- return false ;
58+ BS_ASSERT (stream.template serialize <bool >(plus_one));
6259 if (plus_one)
6360 {
6461 if (Stream::reading)
@@ -88,8 +85,7 @@ namespace bitstream
8885 return true ;
8986
9087 // [126,MaxObjects+1]
91- if (!stream.serialize <uint32_t >(difference, 126 , max_size))
92- return false ;
88+ BS_ASSERT (stream.template serialize <uint32_t >(difference, 126 , max_size));
9389 if (Stream::reading)
9490 current = previous + difference;
9591 previous = current;
Original file line number Diff line number Diff line change 55#include < bitstream/stream/bit_writer.h>
66
77#include < bitstream/traits/array_traits.h>
8+ #include < bitstream/traits/bool_trait.h>
89#include < bitstream/traits/integral_traits.h>
910
1011namespace bitstream ::test::traits
You can’t perform that action at this time.
0 commit comments