better serializer tests
This commit is contained in:
@@ -40,6 +40,7 @@ DataBuffer& DataBuffer::operator>>(std::string& str) {
|
||||
std::copy(m_Buffer.begin() + static_cast<difference_type>(m_ReadOffset),
|
||||
m_Buffer.begin() + static_cast<difference_type>(m_ReadOffset + stringSize), str.begin());
|
||||
m_ReadOffset += stringSize;
|
||||
str.resize(stringSize - 1);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,8 @@ void Deserializer::DeserializeCommandData(cdata::End& a_Command) {}
|
||||
|
||||
|
||||
void Serializer::SerializeCommandData(const cdata::PlaceTower& a_Command) {
|
||||
m_Buffer << (static_cast<std::uint8_t>(a_Command.m_Type) << 4 | a_Command.m_Placer & 0xF) << a_Command.m_Position;
|
||||
m_Buffer << static_cast<std::uint8_t>((static_cast<std::uint8_t>(a_Command.m_Type) << 4 | a_Command.m_Placer & 0xF))
|
||||
<< a_Command.m_Position;
|
||||
}
|
||||
|
||||
void Deserializer::DeserializeCommandData(cdata::PlaceTower& a_Command) {
|
||||
|
||||
Reference in New Issue
Block a user