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:
mitaclaw
2024-12-13 14:02:12 -08:00
parent 87496205aa
commit 433c6ce0f2
6 changed files with 11 additions and 17 deletions

View File

@ -837,7 +837,7 @@ std::string GameFile::GetFileFormatName() const
{
std::string name = DiscIO::GetName(m_blob_type, true);
if (m_is_nkit)
name = Common::FmtFormatT("{0} (NKit)", name);
return Common::FmtFormatT("{0} (NKit)", name);
return name;
}
}