diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2021-03-08 17:37:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-08 17:37:36 +0100 |
commit | 01a4e696b3d2c973cdd1fb4345d747bd10e93ad9 (patch) | |
tree | 92996aef85fca3306b26535fa44feb812deb050b /src/ClientHandle.cpp | |
parent | Some emplace_back replacements (#5149) (diff) | |
download | cuberite-01a4e696b3d2c973cdd1fb4345d747bd10e93ad9.tar cuberite-01a4e696b3d2c973cdd1fb4345d747bd10e93ad9.tar.gz cuberite-01a4e696b3d2c973cdd1fb4345d747bd10e93ad9.tar.bz2 cuberite-01a4e696b3d2c973cdd1fb4345d747bd10e93ad9.tar.lz cuberite-01a4e696b3d2c973cdd1fb4345d747bd10e93ad9.tar.xz cuberite-01a4e696b3d2c973cdd1fb4345d747bd10e93ad9.tar.zst cuberite-01a4e696b3d2c973cdd1fb4345d747bd10e93ad9.zip |
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r-- | src/ClientHandle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 683a243fe..6a6ea951f 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -3299,7 +3299,7 @@ bool cClientHandle::SetState(eState a_NewState) void cClientHandle::ProcessProtocolIn(void) { // Process received network data: - AString IncomingData; + decltype(m_IncomingData) IncomingData; { cCSLock Lock(m_CSIncomingData); std::swap(IncomingData, m_IncomingData); @@ -3312,7 +3312,7 @@ void cClientHandle::ProcessProtocolIn(void) try { - m_Protocol.HandleIncomingData(*this, IncomingData); + m_Protocol.HandleIncomingData(*this, std::move(IncomingData)); } catch (const std::exception & Oops) { @@ -3340,7 +3340,7 @@ void cClientHandle::OnReceivedData(const char * a_Data, size_t a_Length) // Queue the incoming data to be processed in the tick thread: cCSLock Lock(m_CSIncomingData); - m_IncomingData.append(a_Data, a_Length); + m_IncomingData.append(reinterpret_cast<const std::byte *>(a_Data), a_Length); } |