Support relative and absolute time

This fixes #23
This commit is contained in:
momo5502
2024-11-10 15:34:21 +01:00
parent 6f8f840b57
commit d1493867fe
5 changed files with 56 additions and 11 deletions

View File

@@ -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)
{