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

vcmi: use std::any

This commit is contained in:
Konstantin
2023-04-15 02:47:24 +03:00
parent 25783066e8
commit 8dcb041917
3 changed files with 16 additions and 16 deletions

View File

@@ -76,7 +76,7 @@ class DLL_LINKAGE CSerializer
vectors[&typeid(T)] = VectorizedObjectInfo<T, U>(Vector, idRetriever);
}
typedef std::map<const std::type_info *, boost::any, TypeComparer> TTypeVecMap;
typedef std::map<const std::type_info *, std::any, TypeComparer> TTypeVecMap;
TTypeVecMap vectors; //entry must be a pointer to vector containing pointers to the objects of key type
public:
@@ -103,7 +103,7 @@ public:
#ifndef __APPLE__
assert(i->second.type() == typeid(VectorizedObjectInfo<T, U>));
#endif
VectorizedObjectInfo<T, U> *ret = std::any_cast<VectorizedObjectInfo<T, U>*>(&(i->second));
VectorizedObjectInfo<T, U> *ret = std::any_cast<VectorizedObjectInfo<T, U>*>(i->second);
return ret;
}
}