Core/Serialization: Add type tag parameters

This commit is contained in:
Lynix
2018-03-20 20:56:06 +01:00
parent 3165dbe095
commit 69f079fcc8
39 changed files with 128 additions and 90 deletions

View File

@@ -603,9 +603,9 @@ namespace Nz
* \remark Does not save OBB corners
*/
template<typename T>
bool Serialize(SerializationContext& context, const BoundingVolume<T>& boundingVolume)
bool Serialize(SerializationContext& context, const BoundingVolume<T>& boundingVolume, TypeTag<BoundingVolume<T>>)
{
if (!Serialize(context, static_cast<UInt8>(boundingVolume.extend)))
if (!Serialize(context, static_cast<UInt8>(boundingVolume.extend)>))
return false;
if (!Serialize(context, boundingVolume.aabb))
@@ -627,7 +627,7 @@ namespace Nz
* \remark The resulting oriented box corners will *not* be updated, a call to Update is required
*/
template<typename T>
bool Unserialize(SerializationContext& context, BoundingVolume<T>* boundingVolume)
bool Unserialize(SerializationContext& context, BoundingVolume<T>* boundingVolume, TypeTag<BoundingVolume<T>>)
{
UInt8 extend;
if (!Unserialize(context, &extend))