@@ -673,7 +673,7 @@ public:
673
673
674
674
template <typename T>
675
675
void pput (size_t offset, const T& v) {
676
- if (offset > this ->data .size () - sizeof (T )) {
676
+ if (offset + sizeof (T) > this ->data .size ()) {
677
677
this ->data .resize (offset + sizeof (T), ' \0 ' );
678
678
}
679
679
memcpy (this ->data .data () + offset, &v, sizeof (v));
@@ -683,51 +683,35 @@ public:
683
683
inline void put_s8 (int8_t v) { this ->put <int8_t >(v); }
684
684
inline void put_u16 (uint16_t v) { this ->put <uint16_t >(v); }
685
685
inline void put_s16 (int16_t v) { this ->put <int16_t >(v); }
686
- inline void put_u24 (uint32_t v) { this ->put <uint32_t >(v); }
687
- inline void put_s24 (int32_t v) { this ->put <int32_t >(v); }
688
686
inline void put_u32 (uint32_t v) { this ->put <uint32_t >(v); }
689
687
inline void put_s32 (int32_t v) { this ->put <int32_t >(v); }
690
- inline void put_u48 (uint64_t v) { this ->put <uint64_t >(v); }
691
- inline void put_s48 (int64_t v) { this ->put <int64_t >(v); }
692
688
inline void put_u64 (uint64_t v) { this ->put <uint64_t >(v); }
693
689
inline void put_s64 (int64_t v) { this ->put <int64_t >(v); }
694
690
inline void put_f32 (float v) { this ->put <float >(v); }
695
691
inline void put_f64 (double v) { this ->put <double >(v); }
696
692
697
693
inline void put_u16r (uint16_t v) { this ->put <re_uint16_t >(v); }
698
694
inline void put_s16r (int16_t v) { this ->put <re_int16_t >(v); }
699
- inline void put_u24r (uint32_t v) { this ->put <re_uint32_t >(v); }
700
- inline void put_s24r (int32_t v) { this ->put <re_int32_t >(v); }
701
695
inline void put_u32r (uint32_t v) { this ->put <re_uint32_t >(v); }
702
696
inline void put_s32r (int32_t v) { this ->put <re_int32_t >(v); }
703
- inline void put_u48r (uint64_t v) { this ->put <re_uint64_t >(v); }
704
- inline void put_s48r (int64_t v) { this ->put <re_int64_t >(v); }
705
697
inline void put_u64r (uint64_t v) { this ->put <re_uint64_t >(v); }
706
698
inline void put_s64r (int64_t v) { this ->put <re_int64_t >(v); }
707
699
inline void put_f32r (float v) { this ->put <re_float>(v); }
708
700
inline void put_f64r (double v) { this ->put <re_double>(v); }
709
701
710
702
inline void put_u16b (uint16_t v) { this ->put <be_uint16_t >(v); }
711
703
inline void put_s16b (int16_t v) { this ->put <be_int16_t >(v); }
712
- inline void put_u24b (uint32_t v) { this ->put <be_uint32_t >(v); }
713
- inline void put_s24b (int32_t v) { this ->put <be_int32_t >(v); }
714
704
inline void put_u32b (uint32_t v) { this ->put <be_uint32_t >(v); }
715
705
inline void put_s32b (int32_t v) { this ->put <be_int32_t >(v); }
716
- inline void put_u48b (uint64_t v) { this ->put <be_uint64_t >(v); }
717
- inline void put_s48b (int64_t v) { this ->put <be_int64_t >(v); }
718
706
inline void put_u64b (uint64_t v) { this ->put <be_uint64_t >(v); }
719
707
inline void put_s64b (int64_t v) { this ->put <be_int64_t >(v); }
720
708
inline void put_f32b (float v) { this ->put <be_float>(v); }
721
709
inline void put_f64b (double v) { this ->put <be_double>(v); }
722
710
723
711
inline void put_u16l (uint16_t v) { this ->put <le_uint16_t >(v); }
724
712
inline void put_s16l (int16_t v) { this ->put <le_int16_t >(v); }
725
- inline void put_u24l (uint32_t v) { this ->put <le_uint32_t >(v); }
726
- inline void put_s24l (int32_t v) { this ->put <le_int32_t >(v); }
727
713
inline void put_u32l (uint32_t v) { this ->put <le_uint32_t >(v); }
728
714
inline void put_s32l (int32_t v) { this ->put <le_int32_t >(v); }
729
- inline void put_u48l (uint64_t v) { this ->put <le_uint64_t >(v); }
730
- inline void put_s48l (int64_t v) { this ->put <le_int64_t >(v); }
731
715
inline void put_u64l (uint64_t v) { this ->put <le_uint64_t >(v); }
732
716
inline void put_s64l (int64_t v) { this ->put <le_int64_t >(v); }
733
717
inline void put_f32l (float v) { this ->put <le_float>(v); }
@@ -737,51 +721,35 @@ public:
737
721
inline void pput_s8 (size_t offset, int8_t v) { this ->pput <int8_t >(offset, v); }
738
722
inline void pput_u16 (size_t offset, uint16_t v) { this ->pput <uint16_t >(offset, v); }
739
723
inline void pput_s16 (size_t offset, int16_t v) { this ->pput <int16_t >(offset, v); }
740
- inline void pput_u24 (size_t offset, uint32_t v) { this ->pput <uint32_t >(offset, v); }
741
- inline void pput_s24 (size_t offset, int32_t v) { this ->pput <int32_t >(offset, v); }
742
724
inline void pput_u32 (size_t offset, uint32_t v) { this ->pput <uint32_t >(offset, v); }
743
725
inline void pput_s32 (size_t offset, int32_t v) { this ->pput <int32_t >(offset, v); }
744
- inline void pput_u48 (size_t offset, uint64_t v) { this ->pput <uint64_t >(offset, v); }
745
- inline void pput_s48 (size_t offset, int64_t v) { this ->pput <int64_t >(offset, v); }
746
726
inline void pput_u64 (size_t offset, uint64_t v) { this ->pput <uint64_t >(offset, v); }
747
727
inline void pput_s64 (size_t offset, int64_t v) { this ->pput <int64_t >(offset, v); }
748
728
inline void pput_f32 (size_t offset, float v) { this ->pput <float >(offset, v); }
749
729
inline void pput_f64 (size_t offset, double v) { this ->pput <double >(offset, v); }
750
730
751
731
inline void pput_u16r (size_t offset, uint16_t v) { this ->pput <re_uint16_t >(offset, v); }
752
732
inline void pput_s16r (size_t offset, int16_t v) { this ->pput <re_int16_t >(offset, v); }
753
- inline void pput_u24r (size_t offset, uint32_t v) { this ->pput <re_uint32_t >(offset, v); }
754
- inline void pput_s24r (size_t offset, int32_t v) { this ->pput <re_int32_t >(offset, v); }
755
733
inline void pput_u32r (size_t offset, uint32_t v) { this ->pput <re_uint32_t >(offset, v); }
756
734
inline void pput_s32r (size_t offset, int32_t v) { this ->pput <re_int32_t >(offset, v); }
757
- inline void pput_u48r (size_t offset, uint64_t v) { this ->pput <re_uint64_t >(offset, v); }
758
- inline void pput_s48r (size_t offset, int64_t v) { this ->pput <re_int64_t >(offset, v); }
759
735
inline void pput_u64r (size_t offset, uint64_t v) { this ->pput <re_uint64_t >(offset, v); }
760
736
inline void pput_s64r (size_t offset, int64_t v) { this ->pput <re_int64_t >(offset, v); }
761
737
inline void pput_f32r (size_t offset, float v) { this ->pput <re_float>(offset, v); }
762
738
inline void pput_f64r (size_t offset, double v) { this ->pput <re_double>(offset, v); }
763
739
764
740
inline void pput_u16b (size_t offset, uint16_t v) { this ->pput <be_uint16_t >(offset, v); }
765
741
inline void pput_s16b (size_t offset, int16_t v) { this ->pput <be_int16_t >(offset, v); }
766
- inline void pput_u24b (size_t offset, uint32_t v) { this ->pput <be_uint32_t >(offset, v); }
767
- inline void pput_s24b (size_t offset, int32_t v) { this ->pput <be_int32_t >(offset, v); }
768
742
inline void pput_u32b (size_t offset, uint32_t v) { this ->pput <be_uint32_t >(offset, v); }
769
743
inline void pput_s32b (size_t offset, int32_t v) { this ->pput <be_int32_t >(offset, v); }
770
- inline void pput_u48b (size_t offset, uint64_t v) { this ->pput <be_uint64_t >(offset, v); }
771
- inline void pput_s48b (size_t offset, int64_t v) { this ->pput <be_int64_t >(offset, v); }
772
744
inline void pput_u64b (size_t offset, uint64_t v) { this ->pput <be_uint64_t >(offset, v); }
773
745
inline void pput_s64b (size_t offset, int64_t v) { this ->pput <be_int64_t >(offset, v); }
774
746
inline void pput_f32b (size_t offset, float v) { this ->pput <be_float>(offset, v); }
775
747
inline void pput_f64b (size_t offset, double v) { this ->pput <be_double>(offset, v); }
776
748
777
749
inline void pput_u16l (size_t offset, uint16_t v) { this ->pput <le_uint16_t >(offset, v); }
778
750
inline void pput_s16l (size_t offset, int16_t v) { this ->pput <le_int16_t >(offset, v); }
779
- inline void pput_u24l (size_t offset, uint32_t v) { this ->pput <le_uint32_t >(offset, v); }
780
- inline void pput_s24l (size_t offset, int32_t v) { this ->pput <le_int32_t >(offset, v); }
781
751
inline void pput_u32l (size_t offset, uint32_t v) { this ->pput <le_uint32_t >(offset, v); }
782
752
inline void pput_s32l (size_t offset, int32_t v) { this ->pput <le_int32_t >(offset, v); }
783
- inline void pput_u48l (size_t offset, uint64_t v) { this ->pput <le_uint64_t >(offset, v); }
784
- inline void pput_s48l (size_t offset, int64_t v) { this ->pput <le_int64_t >(offset, v); }
785
753
inline void pput_u64l (size_t offset, uint64_t v) { this ->pput <le_uint64_t >(offset, v); }
786
754
inline void pput_s64l (size_t offset, int64_t v) { this ->pput <le_int64_t >(offset, v); }
787
755
inline void pput_f32l (size_t offset, float v) { this ->pput <le_float>(offset, v); }
0 commit comments