CScriptDockAreaChange: Brace conditionals where applicable

This commit is contained in:
Lioncash 2020-05-07 13:38:59 -04:00
parent 269b28f391
commit 49dd7a874b
1 changed files with 7 additions and 5 deletions

View File

@ -15,15 +15,17 @@ void CScriptDockAreaChange::Accept(IVisitor& visitor) { visitor.Visit(this); }
void CScriptDockAreaChange::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) { void CScriptDockAreaChange::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) {
if (msg == EScriptObjectMessage::Action && GetActive()) { if (msg == EScriptObjectMessage::Action && GetActive()) {
for (SConnection conn : x20_conns) { for (SConnection conn : x20_conns) {
if (conn.x0_state != EScriptObjectState::Play) if (conn.x0_state != EScriptObjectState::Play) {
continue; continue;
}
auto search = stateMgr.GetIdListForScript(conn.x8_objId); const auto search = stateMgr.GetIdListForScript(conn.x8_objId);
for (auto it = search.first; it != search.second; ++it) { for (auto it = search.first; it != search.second; ++it) {
TUniqueId id = it->second; const TUniqueId id = it->second;
TCastToPtr<CScriptDock> dock(stateMgr.ObjectById(id)); const TCastToPtr<CScriptDock> dock(stateMgr.ObjectById(id));
if (dock) if (dock) {
dock->SetDockReference(stateMgr, x34_dockReference); dock->SetDockReference(stateMgr, x34_dockReference);
}
} }
} }