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 committed 2025-03-10 12:38:03 -07:00
1 parent 87496205aa
commit 433c6ce0f2
6 files changed
+11 -17

No files matched your search

+1 -2
View File
@@ -39,8 +39,7 @@ static std::unique_ptr<DiscIO::FileInfo> GetFileInfo(const DiscIO::Volume& disc_
if (!filesystem)
return nullptr;
std::unique_ptr<DiscIO::FileInfo> info = filesystem->FindFileInfo(path);
return info;
return filesystem->FindFileInfo(path);
}
static bool VolumeSupported(const DiscIO::Volume& disc_volume)