Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion custom_transforms/parse/decode_parse_float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ size_t constexpr maxStrLen(double)

class StreamAppender {
public:
using value_type = char;

explicit StreamAppender(ZL_Output* stream)
: buffer_((char*)ZL_Output_ptr(stream))
{
Expand All @@ -29,6 +31,11 @@ class StreamAppender {
idx_ += length;
}

void append(std::string_view sv)
{
append(sv.data(), sv.size());
}

void push_back(char c)
{
buffer_[idx_++] = c;
Expand All @@ -42,7 +49,7 @@ class StreamAppender {
}

private:
char* buffer_;
char* buffer_{ nullptr };
size_t idx_{ 0 };
size_t prev_{ 0 };
};
Expand Down
Loading