mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
Removed strict-aliasing warning
This commit is contained in:
parent
4e39b23e45
commit
c63113f825
File diff suppressed because it is too large
Load Diff
@ -212,11 +212,13 @@ namespace crow
|
|||||||
case WebSocketReadState::Len16:
|
case WebSocketReadState::Len16:
|
||||||
{
|
{
|
||||||
remaining_length_ = 0;
|
remaining_length_ = 0;
|
||||||
boost::asio::async_read(adaptor_.socket(), boost::asio::buffer(&remaining_length_, 2),
|
uint16_t remaining_length16_ = 0;
|
||||||
[this](const boost::system::error_code& ec, std::size_t bytes_transferred)
|
boost::asio::async_read(adaptor_.socket(), boost::asio::buffer(&remaining_length16_, 2),
|
||||||
|
[this,&remaining_length16_](const boost::system::error_code& ec, std::size_t bytes_transferred)
|
||||||
{
|
{
|
||||||
is_reading = false;
|
is_reading = false;
|
||||||
remaining_length_ = ntohs(*(uint16_t*)&remaining_length_);
|
remaining_length16_ = ntohs(remaining_length16_);
|
||||||
|
remaining_length_ = remaining_length16_;
|
||||||
#ifdef CROW_ENABLE_DEBUG
|
#ifdef CROW_ENABLE_DEBUG
|
||||||
if (!ec && bytes_transferred != 2)
|
if (!ec && bytes_transferred != 2)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user