Replaced c style cast with static_cast and fixed generate script
This commit is contained in:
@@ -77,6 +77,7 @@ namespace ecs::lua {
|
||||
};
|
||||
|
||||
preload["ecs.LuaComponent"] = [&lua] {
|
||||
// @todo Do we want to register this into the global namespace?
|
||||
lua.new_usertype<LuaComponent>("LuaComponent",
|
||||
"__index", [] (LuaComponent* thiz, std::string key) {
|
||||
return thiz->table[key];
|
||||
@@ -210,7 +211,7 @@ namespace ecs::lua {
|
||||
}));
|
||||
|
||||
component.set_function("_convert", [] (ecs::Component* component) {
|
||||
return (LuaComponent*)component;
|
||||
return static_cast<LuaComponent*>(component);
|
||||
});
|
||||
|
||||
return component;
|
||||
|
||||
Reference in New Issue
Block a user