2
0
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:
Jack Andersen
2016-10-02 18:39:31 -10:00
parent e92d4ab6a8
commit 9b6ab93ae5
14 changed files with 25 additions and 25 deletions

View File

@@ -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));
}
}