mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 23:14:13 +01:00
ircd::json::stack: Add noexcept for non-throwers called during stack unwinds.
This commit is contained in:
parent
387e8b8eed
commit
aa166d0c5d
2 changed files with 6 additions and 5 deletions
|
@ -57,8 +57,8 @@ struct ircd::json::stack
|
|||
array *ca {nullptr}; ///< Could be union with top_object but
|
||||
|
||||
void rethrow_exception();
|
||||
void append(const size_t &expect, const window_buffer::closure &);
|
||||
void append(const string_view &);
|
||||
void append(const size_t &expect, const window_buffer::closure &) noexcept;
|
||||
void append(const string_view &) noexcept;
|
||||
|
||||
public:
|
||||
bool opened() const; ///< Current stacking in progress.
|
||||
|
@ -68,7 +68,7 @@ struct ircd::json::stack
|
|||
size_t remaining() const;
|
||||
const_buffer completed() const;
|
||||
|
||||
bool flush(const bool &force = false);
|
||||
bool flush(const bool &force = false) noexcept;
|
||||
void clear();
|
||||
|
||||
stack(const mutable_buffer &,
|
||||
|
|
|
@ -434,6 +434,7 @@ noexcept
|
|||
|
||||
void
|
||||
ircd::json::stack::append(const string_view &s)
|
||||
noexcept
|
||||
{
|
||||
append(size(s), [&s](const mutable_buffer &buf)
|
||||
{
|
||||
|
@ -444,7 +445,7 @@ ircd::json::stack::append(const string_view &s)
|
|||
void
|
||||
ircd::json::stack::append(const size_t &expect,
|
||||
const window_buffer::closure &closure)
|
||||
try
|
||||
noexcept try
|
||||
{
|
||||
if(unlikely(eptr))
|
||||
return;
|
||||
|
@ -494,7 +495,7 @@ ircd::json::stack::rethrow_exception()
|
|||
|
||||
bool
|
||||
ircd::json::stack::flush(const bool &force)
|
||||
try
|
||||
noexcept try
|
||||
{
|
||||
if(!flusher)
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue