Replaced c style cast with static_cast and fixed generate script

This commit is contained in:
2020-05-14 18:03:16 +02:00
parent c9f05af6c9
commit e4adee0e8c
8 changed files with 20 additions and 14 deletions

View File

@@ -42,13 +42,13 @@ namespace ecs::serial {
void register_component(Args... args) {
// Serialize component
auto serialize = [args...] (std::ostream& os, ecs::Component* component) {
T* t = (T*)component;
T* t = static_cast<T*>(component);
serialize_member(os, t, args...);
};
// Deserialize component
auto deserialize = [args...] (std::istream& is, ecs::Component* component) {
T* t = (T*)component;
T* t = static_cast<T*>(component);
deserialize_member(is, t, args...);
};