diff options
| author | JMC47 <JMC4789@gmail.com> | 2025-03-29 03:26:46 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-29 03:26:46 -0400 |
| commit | 9819d66a478be3d57af9278e6c2cb433556a78d1 (patch) | |
| tree | 07623114def6822d8abd7c61d77520fe98b391ce /Source | |
| parent | f00b7d39f0b2ff6cebbd78125bf7cdc888b9a6af (diff) | |
| parent | 433c6ce0f20e33379985a56b58540197feeeff59 (diff) | |
Merge pull request #13221 from mitaclaw/nrvo-fails-1
GCC: Remedy NRVO Fails
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/IOS/FS/FileSystemCommon.cpp | 3 | ||||
| -rw-r--r-- | Source/Core/DiscIO/VolumeVerifier.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DolphinTool/ExtractCommand.cpp | 3 | ||||
| -rw-r--r-- | Source/Core/UICommon/GameFile.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/TextureInfo.cpp | 13 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoaderX64.cpp | 5 |
6 files changed, 11 insertions, 17 deletions
diff --git a/Source/Core/Core/IOS/FS/FileSystemCommon.cpp b/Source/Core/Core/IOS/FS/FileSystemCommon.cpp index 571f22a529..077e5c6d28 100644 --- a/Source/Core/Core/IOS/FS/FileSystemCommon.cpp +++ b/Source/Core/Core/IOS/FS/FileSystemCommon.cpp @@ -95,8 +95,7 @@ Result<FileStatus> FileHandle::GetStatus() const Result<FileHandle> FileSystem::CreateAndOpenFile(Uid uid, Gid gid, const std::string& path, Modes modes) { - Result<FileHandle> file = OpenFile(uid, gid, path, Mode::ReadWrite); - if (file.Succeeded()) + if (Result<FileHandle> file = OpenFile(uid, gid, path, Mode::ReadWrite)) return file; const ResultCode result = CreateFile(uid, gid, path, 0, modes); diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index 5f4c254137..414e4ae3a1 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -697,7 +697,7 @@ std::string VolumeVerifier::GetPartitionName(std::optional<u32> type) const // (French), Clásicos (Spanish), Capolavori (Italian), 클래식 게임 체험판 (Korean). // If your language is not one of the languages above, consider leaving the string untranslated // so that people will recognize it as the name of the game mode. - name = Common::FmtFormatT("{0} (Masterpiece)", name); + return Common::FmtFormatT("{0} (Masterpiece)", name); } return name; } diff --git a/Source/Core/DolphinTool/ExtractCommand.cpp b/Source/Core/DolphinTool/ExtractCommand.cpp index d1daa3dd07..32d2a49d86 100644 --- a/Source/Core/DolphinTool/ExtractCommand.cpp +++ b/Source/Core/DolphinTool/ExtractCommand.cpp @@ -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) diff --git a/Source/Core/UICommon/GameFile.cpp b/Source/Core/UICommon/GameFile.cpp index 442added6e..b35349b8b0 100644 --- a/Source/Core/UICommon/GameFile.cpp +++ b/Source/Core/UICommon/GameFile.cpp @@ -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; } } diff --git a/Source/Core/VideoCommon/TextureInfo.cpp b/Source/Core/VideoCommon/TextureInfo.cpp index 5ee23f3671..27055f462d 100644 --- a/Source/Core/VideoCommon/TextureInfo.cpp +++ b/Source/Core/VideoCommon/TextureInfo.cpp @@ -183,14 +183,11 @@ TextureInfo::NameDetails TextureInfo::CalculateTextureName() const const u64 tex_hash = XXH64(m_ptr, m_texture_size, 0); const u64 tlut_hash = tlut_size ? XXH64(tlut, tlut_size, 0) : 0; - NameDetails result; - result.base_name = fmt::format("{}{}x{}{}", format_prefix, m_raw_width, m_raw_height, - m_mipmaps_enabled ? "_m" : ""); - result.texture_name = fmt::format("{:016x}", tex_hash); - result.tlut_name = tlut_size ? fmt::format("_{:016x}", tlut_hash) : ""; - result.format_name = fmt::to_string(static_cast<int>(m_texture_format)); - - return result; + return {.base_name = fmt::format("{}{}x{}{}", format_prefix, m_raw_width, m_raw_height, + m_mipmaps_enabled ? "_m" : ""), + .texture_name = fmt::format("{:016x}", tex_hash), + .tlut_name = tlut_size ? fmt::format("_{:016x}", tlut_hash) : "", + .format_name = fmt::to_string(static_cast<int>(m_texture_format))}; } bool TextureInfo::IsDataValid() const diff --git a/Source/Core/VideoCommon/VertexLoaderX64.cpp b/Source/Core/VideoCommon/VertexLoaderX64.cpp index aa8ad2bd67..c7cbf55257 100644 --- a/Source/Core/VideoCommon/VertexLoaderX64.cpp +++ b/Source/Core/VideoCommon/VertexLoaderX64.cpp @@ -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); } } |
