mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 13:27:33 +02:00
Fix costly potential value-init in parser
This commit is contained in:
@ -3,6 +3,8 @@ Version 66:
|
|||||||
* string_param optimizations
|
* string_param optimizations
|
||||||
* Add serializer request/response aliases
|
* Add serializer request/response aliases
|
||||||
* Make consuming_buffers smaller
|
* Make consuming_buffers smaller
|
||||||
|
* Fix costly potential value-init in parser
|
||||||
|
* Fix unused parameter warning
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -119,6 +119,7 @@ template<
|
|||||||
CharT*
|
CharT*
|
||||||
raw_to_string(CharT* last, std::size_t size, Integer i)
|
raw_to_string(CharT* last, std::size_t size, Integer i)
|
||||||
{
|
{
|
||||||
|
boost::ignore_unused(size);
|
||||||
BOOST_ASSERT(size >= max_digits(sizeof(Integer)));
|
BOOST_ASSERT(size >= max_digits(sizeof(Integer)));
|
||||||
return raw_to_string<CharT, Integer, Traits>(
|
return raw_to_string<CharT, Integer, Traits>(
|
||||||
last, i, std::is_signed<Integer>{});
|
last, i, std::is_signed<Integer>{});
|
||||||
|
@ -67,7 +67,12 @@ public:
|
|||||||
message<isRequest, Body, basic_fields<Allocator>>;
|
message<isRequest, Body, basic_fields<Allocator>>;
|
||||||
|
|
||||||
/// Constructor (default)
|
/// Constructor (default)
|
||||||
parser() = default;
|
parser()
|
||||||
|
{
|
||||||
|
// avoid `parser()=default` otherwise value-init
|
||||||
|
// for members can happen (i.e. a big memset on
|
||||||
|
// static_buffer_n).
|
||||||
|
}
|
||||||
|
|
||||||
/// Copy constructor (disallowed)
|
/// Copy constructor (disallowed)
|
||||||
parser(parser const&) = delete;
|
parser(parser const&) = delete;
|
||||||
|
Reference in New Issue
Block a user