- split the TObjPtr serializers into a separate file to avoid polluting everything that needs to use the serializer.

To use these it is necessary to include dobject.h and all its dependencies, so this should not be done unless necessary.
This commit is contained in:
Christoph Oelckers 2020-04-11 19:26:28 +02:00
commit f74efcf721
18 changed files with 35 additions and 15 deletions

17
src/serialize_obj.h Normal file
View file

@ -0,0 +1,17 @@
#pragma once
// These are in a separate header because they require some rather 'dirty' headers to work which should not be part of serializer.h
template<class T>
FSerializer &Serialize(FSerializer &arc, const char *key, TObjPtr<T> &value, TObjPtr<T> *)
{
Serialize(arc, key, value.o, nullptr);
return arc;
}
template<class T>
FSerializer &Serialize(FSerializer &arc, const char *key, TObjPtr<T> &value, T *)
{
Serialize(arc, key, value.o, nullptr);
return arc;
}