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:
parent
b6bfc5dd5c
commit
4c43b42f62
2 changed files with 12 additions and 0 deletions
|
@ -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.
|
||||
|
|
11
ircd/json.cc
11
ircd/json.cc
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue