mirror of https://github.com/AxioDL/metaforce.git
Remove unnecessary and RVO-detrimental moves
This commit is contained in:
parent
e92d4ab6a8
commit
9b6ab93ae5
|
@ -148,7 +148,7 @@ specter::ISplitSpaceController* Space::spaceSplit(specter::SplitView::Axis axis,
|
|||
}
|
||||
|
||||
SplitSpace* ss = new SplitSpace(m_vm, m_parent, axis);
|
||||
ss->setChildSlot(thisSlot, std::move(m_parent->exchangeSpaceSplitJoin(this, std::unique_ptr<Space>(ss))));
|
||||
ss->setChildSlot(thisSlot, m_parent->exchangeSpaceSplitJoin(this, std::unique_ptr<Space>(ss)));
|
||||
ss->setChildSlot(thisSlot ^ 1, std::unique_ptr<Space>(copy(ss)));
|
||||
m_vm.BuildSpaceViews();
|
||||
return ss;
|
||||
|
|
|
@ -59,7 +59,7 @@ CInputStream* CResLoader::LoadResourceFromMemorySync(const SObjectTag& tag, cons
|
|||
if (x50_cachedResInfo->xb_compressed)
|
||||
{
|
||||
newStrm->readUint32Big();
|
||||
newStrm = new CZipInputStream(std::move(std::unique_ptr<CInputStream>(newStrm)));
|
||||
newStrm = new CZipInputStream(std::unique_ptr<CInputStream>(newStrm));
|
||||
}
|
||||
return newStrm;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ CInputStream* CResLoader::LoadNewResourceSync(const SObjectTag& tag, void* extBu
|
|||
if (x50_cachedResInfo->xb_compressed)
|
||||
{
|
||||
newStrm->readUint32Big();
|
||||
newStrm = new CZipInputStream(std::move(std::unique_ptr<CInputStream>(newStrm)));
|
||||
newStrm = new CZipInputStream(std::unique_ptr<CInputStream>(newStrm));
|
||||
}
|
||||
return newStrm;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ std::vector<std::shared_ptr<IMetaAnim>> CMetaAnimSequence::CreateSequence(CInput
|
|||
ret.reserve(seqCount);
|
||||
|
||||
for (u32 i=0 ; i<seqCount ; ++i)
|
||||
ret.push_back(std::move(CMetaAnimFactory::CreateMetaAnim(in)));
|
||||
ret.push_back(CMetaAnimFactory::CreateMetaAnim(in));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ void CCollisionResponseData::AddParticleSystemToResponse(EWeaponCollisionRespons
|
|||
int i = int(type);
|
||||
std::vector<ResId> tracker;
|
||||
tracker.resize(8);
|
||||
x0_generators[i].emplace(std::move(CPF::GetChildGeneratorDesc(in, resPool, tracker).m_token));
|
||||
x0_generators[i].emplace(CPF::GetChildGeneratorDesc(in, resPool, tracker).m_token);
|
||||
}
|
||||
|
||||
bool CCollisionResponseData::CheckAndAddDecalToResponse(FourCC clsId, CInputStream& in, CSimplePool* resPool)
|
||||
|
@ -137,7 +137,7 @@ bool CCollisionResponseData::CheckAndAddDecalToResponse(FourCC clsId, CInputStre
|
|||
if (!id)
|
||||
return true;
|
||||
|
||||
x20_decals[i].emplace(std::move(resPool->GetObj({FOURCC('DPSC'), id})));
|
||||
x20_decals[i].emplace(resPool->GetObj({FOURCC('DPSC'), id}));
|
||||
return true;
|
||||
}
|
||||
i++;
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ void CFrontEndUI::OnMainMenuAdvance(CGuiTableGroup* grp)
|
|||
|
||||
void CFrontEndUI::StartSlideShow(CArchitectureQueue& queue)
|
||||
{
|
||||
queue.Push(std::move(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 12, 11, new CSlideShow())));
|
||||
queue.Push(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 12, 11, new CSlideShow()));
|
||||
}
|
||||
|
||||
std::string CFrontEndUI::GetAttractMovieFileName(int idx)
|
||||
|
|
|
@ -50,12 +50,12 @@ void CMainFlow::SetGameState(EClientFlowStates state, CArchitectureQueue& queue)
|
|||
*/
|
||||
g_Main->LoadAudio();
|
||||
g_Main->RegisterResourceTweaks();
|
||||
queue.Push(std::move(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 12, 11, new CFrontEndUI(queue))));
|
||||
queue.Push(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 12, 11, new CFrontEndUI(queue)));
|
||||
break;
|
||||
}
|
||||
case EClientFlowStates::GameLoad:
|
||||
{
|
||||
queue.Push(std::move(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 10, 1000, new CMFGameLoader())));
|
||||
queue.Push(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 10, 1000, new CMFGameLoader()));
|
||||
break;
|
||||
}
|
||||
case EClientFlowStates::MoviePlay:
|
||||
|
@ -63,10 +63,10 @@ void CMainFlow::SetGameState(EClientFlowStates state, CArchitectureQueue& queue)
|
|||
switch (g_Main->GetGameplayResult())
|
||||
{
|
||||
case EGameplayResult::Win:
|
||||
queue.Push(std::move(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 12, 11, new CPlayMovie(CPlayMovie::EWhichMovie::WinGame))));
|
||||
queue.Push(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 12, 11, new CPlayMovie(CPlayMovie::EWhichMovie::WinGame)));
|
||||
break;
|
||||
case EGameplayResult::Lose:
|
||||
queue.Push(std::move(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 12, 11, new CPlayMovie(CPlayMovie::EWhichMovie::LoseGame))));
|
||||
queue.Push(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 12, 11, new CPlayMovie(CPlayMovie::EWhichMovie::LoseGame)));
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
|
|
@ -60,8 +60,8 @@ bool CGameArchitectureSupport::Update()
|
|||
|
||||
g_GameState->GetWorldTransitionManager()->TouchModels();
|
||||
int unk = 0;
|
||||
m_archQueue.Push(std::move(MakeMsg::CreateFrameBegin(EArchMsgTarget::Game, unk)));
|
||||
m_archQueue.Push(std::move(MakeMsg::CreateTimerTick(EArchMsgTarget::Game, 1.f / 60.f)));
|
||||
m_archQueue.Push(MakeMsg::CreateFrameBegin(EArchMsgTarget::Game, unk));
|
||||
m_archQueue.Push(MakeMsg::CreateTimerTick(EArchMsgTarget::Game, 1.f / 60.f));
|
||||
|
||||
m_ioWinManager.PumpMessages(m_archQueue);
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ class CGameArchitectureSupport
|
|||
void modKeyUp(boo::EModifierKey mod)
|
||||
{ m_inputGenerator.modKeyUp(mod); }
|
||||
|
||||
void destroyed() { m_archQueue.Push(std::move(MakeMsg::CreateApplicationExit(EArchMsgTarget::ArchitectureSupport))); }
|
||||
void destroyed() { m_archQueue.Push(MakeMsg::CreateApplicationExit(EArchMsgTarget::ArchitectureSupport)); }
|
||||
|
||||
void resized(const boo::SWindowRect &rect)
|
||||
{
|
||||
|
|
|
@ -44,13 +44,13 @@ SParticleModel CParticleDataFactory::GetModel(CInputStream& in, CSimplePool* res
|
|||
ResId id = in.readUint32Big();
|
||||
if (!id)
|
||||
return {};
|
||||
return {std::move(resPool->GetObj({FOURCC('CMDL'), id})), true};
|
||||
return {resPool->GetObj({FOURCC('CMDL'), id}), true};
|
||||
}
|
||||
|
||||
SChildGeneratorDesc CParticleDataFactory::GetChildGeneratorDesc(ResId res, CSimplePool* resPool, const std::vector<ResId>& tracker)
|
||||
{
|
||||
if (std::count(tracker.cbegin(), tracker.cend(), res) == 0)
|
||||
return {std::move(resPool->GetObj({FOURCC('PART'), res})), true};
|
||||
return {resPool->GetObj({FOURCC('PART'), res}), true};
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ SSwooshGeneratorDesc CParticleDataFactory::GetSwooshGeneratorDesc(CInputStream&
|
|||
ResId id = in.readUint32Big();
|
||||
if (!id)
|
||||
return {};
|
||||
return {std::move(resPool->GetObj({FOURCC('SWHC'), id})), true};
|
||||
return {resPool->GetObj({FOURCC('SWHC'), id}), true};
|
||||
}
|
||||
|
||||
SElectricGeneratorDesc CParticleDataFactory::GetElectricGeneratorDesc(CInputStream& in, CSimplePool* resPool)
|
||||
|
@ -84,7 +84,7 @@ SElectricGeneratorDesc CParticleDataFactory::GetElectricGeneratorDesc(CInputStre
|
|||
ResId id = in.readUint32Big();
|
||||
if (!id)
|
||||
return {};
|
||||
return {std::move(resPool->GetObj({FOURCC('ELSC'), id})), true};
|
||||
return {resPool->GetObj({FOURCC('ELSC'), id}), true};
|
||||
}
|
||||
|
||||
CUVElement* CParticleDataFactory::GetTextureElement(CInputStream& in, CSimplePool* resPool)
|
||||
|
|
2
amuse
2
amuse
|
@ -1 +1 @@
|
|||
Subproject commit 2521f37408371869a21601ec59b423ea31fea9a8
|
||||
Subproject commit 7cb7ed73ea2b91227b55fae206ffbc86a82a4844
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
|||
Subproject commit 9d1f234108059b06525f42e1b1d1e85bb418a70e
|
||||
Subproject commit 2cc14eaa3642f003b0c71945e23c4a70482c1bda
|
2
nod
2
nod
|
@ -1 +1 @@
|
|||
Subproject commit 38de2ec4a1f1974c8a7b02a78c593907886ae3aa
|
||||
Subproject commit d106299a1154aeef9890ba4af7b9e43915160be6
|
2
specter
2
specter
|
@ -1 +1 @@
|
|||
Subproject commit b9877633b0774cd85557696228bfa8e7505ec153
|
||||
Subproject commit 1410e76566910b2436d1588f6976470684d57e33
|
Loading…
Reference in New Issue