remove void*

This commit is contained in:
David Markowitz 2024-03-02 00:25:16 -08:00
parent 4ffdf851c6
commit 6df6e3e313

View File

@ -841,11 +841,9 @@ bool Entity::HasComponent(const eReplicaComponentType componentId) const {
std::vector<ScriptComponent*> Entity::GetScriptComponents() { std::vector<ScriptComponent*> Entity::GetScriptComponents() {
std::vector<ScriptComponent*> comps; std::vector<ScriptComponent*> comps;
for (std::pair<eReplicaComponentType, void*> p : m_Components) {
if (p.first == eReplicaComponentType::SCRIPT) { auto* scriptComponent = GetComponent<ScriptComponent>();
comps.push_back(static_cast<ScriptComponent*>(p.second)); if (scriptComponent) comps.push_back(scriptComponent);
}
}
return comps; return comps;
} }