0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-04 21:08:57 +01:00

ircd::json::stack: Add overload for character append.

This commit is contained in:
Jason Volk 2019-02-07 08:16:37 -08:00
parent b6bfc5dd5c
commit 4c43b42f62
2 changed files with 12 additions and 0 deletions

View file

@ -61,6 +61,7 @@ struct ircd::json::stack
void rethrow_exception();
void append(const size_t &expect, const window_buffer::closure &) noexcept;
void append(const string_view &) noexcept;
void append(const char &) noexcept;
public:
bool opened() const; ///< Current stacking in progress.

View file

@ -450,6 +450,17 @@ noexcept
assert(clean() || done());
}
void
ircd::json::stack::append(const char &c)
noexcept
{
append(1, [&c](const mutable_buffer &buf)
{
buf[0] = c;
return 1;
});
}
void
ircd::json::stack::append(const string_view &s)
noexcept