mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01:00
ircd:Ⓜ️:request: Minor simplify.
This commit is contained in:
parent
bdf3e0a126
commit
bfaf21807b
1 changed files with 7 additions and 2 deletions
|
@ -174,11 +174,16 @@ const
|
|||
size_t(generate_content_max)
|
||||
};
|
||||
|
||||
if(unlikely(json::serialized(*this) > buffer::size(buf)))
|
||||
const auto serial_size
|
||||
{
|
||||
json::serialized(*this)
|
||||
};
|
||||
|
||||
if(unlikely(serial_size > buffer::size(buf)))
|
||||
throw m::error
|
||||
{
|
||||
"M_REQUEST_TOO_LARGE", "This server generated a request of %zu bytes; limit is %zu",
|
||||
json::serialized(*this),
|
||||
serial_size,
|
||||
buffer::size(buf)
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue