Minor fixes
This commit is contained in:
parent
fcfcc94c49
commit
57b37c3d2c
|
|
@ -41,7 +41,7 @@ namespace Nz
|
|||
|
||||
inline void String::ReleaseString()
|
||||
{
|
||||
m_sharedString = std::move(GetEmptyString());
|
||||
m_sharedString = GetEmptyString();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -886,6 +886,7 @@ namespace Nz
|
|||
|
||||
canPing = false;
|
||||
|
||||
assert(outgoingCommand->command.header.command < ENetProtocolCommand_Count);
|
||||
std::size_t commandSize = s_commandSizes[outgoingCommand->command.header.command & ENetProtocolCommand_Mask];
|
||||
if (m_commandCount >= m_commands.size() || m_bufferCount + 1 >= m_buffers.size() || peer->GetMtu() - m_packetSize < commandSize ||
|
||||
(outgoingCommand->packet && UInt16(peer->GetMtu() - m_packetSize) < UInt16(commandSize + outgoingCommand->fragmentLength)))
|
||||
|
|
@ -1138,6 +1139,7 @@ namespace Nz
|
|||
{
|
||||
auto outgoingCommand = currentCommand;
|
||||
|
||||
assert(outgoingCommand->command.header.command < ENetProtocolCommand_Count);
|
||||
std::size_t commandSize = s_commandSizes[outgoingCommand->command.header.command & ENetProtocolCommand_Mask];
|
||||
|
||||
if (m_commandCount >= m_commands.size() || m_bufferCount + 1 >= m_buffers.size() || peer->m_mtu - m_packetSize < commandSize ||
|
||||
|
|
@ -1351,6 +1353,7 @@ namespace Nz
|
|||
|
||||
std::size_t ENetHost::GetCommandSize(UInt8 commandNumber)
|
||||
{
|
||||
assert(commandNumber < ENetProtocolCommand_Count);
|
||||
return s_commandSizes[commandNumber & ENetProtocolCommand_Mask];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue