1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Serialize Enitity classes by their ID

This commit is contained in:
Ivan Savenko
2023-11-04 18:22:27 +02:00
parent f8a7f6e5a7
commit c7676bde53
6 changed files with 71 additions and 24 deletions

View File

@@ -164,24 +164,6 @@ struct VectorizedIDType
using type = std::conditional_t<std::is_base_of_v<CGObjectInstance, T>, ObjectInstanceID, int32_t>;
};
template <>
struct VectorizedIDType<CArtifact>
{
using type = ArtifactID;
};
template <>
struct VectorizedIDType<CCreature>
{
using type = CreatureID;
};
template <>
struct VectorizedIDType<CHero>
{
using type = HeroTypeID;
};
template <>
struct VectorizedIDType<CArtifactInstance>
{