mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 23:47:42 +00:00
Remove unnecessary and RVO-detrimental moves
This commit is contained in:
@@ -23,7 +23,7 @@ void CInputGenerator::Update(float dt, CArchitectureQueue& queue)
|
||||
bool connected;
|
||||
EStatusChange change = m_dolphinCb.getStatusChange(i, connected);
|
||||
if (change != EStatusChange::NoChange)
|
||||
queue.Push(std::move(MakeMsg::CreateControllerStatus(EArchMsgTarget::Game, i, connected)));
|
||||
queue.Push(MakeMsg::CreateControllerStatus(EArchMsgTarget::Game, i, connected));
|
||||
if (connected)
|
||||
{
|
||||
CFinalInput input = m_dolphinCb.getFinalInput(i, dt, m_leftDiv, m_rightDiv);
|
||||
@@ -32,13 +32,13 @@ void CInputGenerator::Update(float dt, CArchitectureQueue& queue)
|
||||
input |= kbInput;
|
||||
kbUsed = true;
|
||||
}
|
||||
queue.Push(std::move(MakeMsg::CreateUserInput(EArchMsgTarget::Game, input)));
|
||||
queue.Push(MakeMsg::CreateUserInput(EArchMsgTarget::Game, input));
|
||||
}
|
||||
}
|
||||
|
||||
/* Send straight keyboard input if no first controller present */
|
||||
if (!kbUsed)
|
||||
queue.Push(std::move(MakeMsg::CreateUserInput(EArchMsgTarget::Game, kbInput)));
|
||||
queue.Push(MakeMsg::CreateUserInput(EArchMsgTarget::Game, kbInput));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user