mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 21:28:51 +00:00
GCC: Remedy NRVO Fails
Using the `-Wnrvo` flag introduced by GCC 14, I identified a few places where NRVO was clearly intended, but is fumbled.
This commit is contained in:
parent
87496205aa
commit
433c6ce0f2
6 changed files with 11 additions and 17 deletions
|
@ -57,11 +57,10 @@ VertexLoaderX64::VertexLoaderX64(const TVtxDesc& vtx_desc, const VAT& vtx_att)
|
|||
|
||||
OpArg VertexLoaderX64::GetVertexAddr(CPArray array, VertexComponentFormat attribute)
|
||||
{
|
||||
OpArg data = MDisp(src_reg, m_src_ofs);
|
||||
if (IsIndexed(attribute))
|
||||
{
|
||||
int bits = attribute == VertexComponentFormat::Index8 ? 8 : 16;
|
||||
LoadAndSwap(bits, scratch1, data);
|
||||
LoadAndSwap(bits, scratch1, MDisp(src_reg, m_src_ofs));
|
||||
m_src_ofs += bits / 8;
|
||||
if (array == CPArray::Position)
|
||||
{
|
||||
|
@ -74,7 +73,7 @@ OpArg VertexLoaderX64::GetVertexAddr(CPArray array, VertexComponentFormat attrib
|
|||
}
|
||||
else
|
||||
{
|
||||
return data;
|
||||
return MDisp(src_reg, m_src_ofs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue