Replaced c style cast with static_cast and fixed generate script
This commit is contained in:
@@ -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...);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user