mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-24 14:11:02 +00:00
@@ -433,6 +433,12 @@ namespace utils
|
||||
std::vector<std::byte> buffer_{};
|
||||
};
|
||||
|
||||
template <>
|
||||
inline void buffer_deserializer::read<bool>(bool& object)
|
||||
{
|
||||
object = this->read<uint8_t>() != 0;
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void buffer_deserializer::read<std::string>(std::string& object)
|
||||
{
|
||||
@@ -445,6 +451,12 @@ namespace utils
|
||||
object = this->read_string<wchar_t>();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void buffer_serializer::write<bool>(const bool& object)
|
||||
{
|
||||
this->write<uint8_t>(object ? 1 : 0);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void buffer_serializer::write<std::string>(const std::string& object)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user