1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Cleanup serializer/deserializer code

This commit is contained in:
Ivan Savenko
2025-04-08 16:37:38 +03:00
parent 93b18ee94b
commit f9989d9152
5 changed files with 245 additions and 237 deletions

View File

@@ -34,7 +34,7 @@ public:
static std::unique_ptr<T> deepCopy(const T &data)
{
CMemorySerializer mem;
mem.oser.saveRawPointer(&data);
mem.oser & &data;
std::unique_ptr<T> ret;
mem.iser & ret;
@@ -45,7 +45,7 @@ public:
static std::shared_ptr<T> deepCopyShared(const T &data)
{
CMemorySerializer mem;
mem.oser.saveRawPointer(&data);
mem.oser & &data;
std::shared_ptr<T> ret;
mem.iser & ret;