Skip to content

Commit

Permalink
Enable Enable optional reservation of raw output buffer size.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Jun 26, 2023
1 parent 9852194 commit 1baca1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/byteme/RawBufferWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ namespace byteme {
class RawBufferWriter : public Writer {
public:
/**
* @param n Initial size of the output buffer to reserve.
*/
RawBufferWriter() {}
RawBufferWriter(size_t n = 0) {
output.reserve(n);
}

using Writer::write;

Expand Down

0 comments on commit 1baca1f

Please sign in to comment.