File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -294,9 +294,9 @@ class BufferStream {
294294 }
295295
296296 template <BufferStreamPODType T = std::byte>
297- BufferStream& pad (std::uint64_t n = 1 ) {
298- for (std::uint64_t i = 0 ; i < n * sizeof (T) ; i++) {
299- this ->write <std::byte>({} );
297+ BufferStream& pad (std::uint64_t n = 1 , T value = {} ) {
298+ for (std::uint64_t i = 0 ; i < n; i++) {
299+ this ->write <T>(value );
300300 }
301301 return *this ;
302302 }
Original file line number Diff line number Diff line change @@ -235,9 +235,9 @@ class FileStream {
235235 }
236236
237237 template <BufferStreamPODType T = std::byte>
238- FileStream& pad (std::uint64_t n = 1 ) {
239- for (std::uint64_t i = 0 ; i < n * sizeof (T) ; i++) {
240- this ->write <std::byte>({} );
238+ FileStream& pad (std::uint64_t n = 1 , T value = {} ) {
239+ for (std::uint64_t i = 0 ; i < n; i++) {
240+ this ->write <T>(value );
241241 }
242242 return *this ;
243243 }
You can’t perform that action at this time.
0 commit comments