mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-21 21:17:25 +00:00
remove void*
This commit is contained in:
parent
4ffdf851c6
commit
6df6e3e313
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user