diff options
| author | JosJuice <josjuice@gmail.com> | 2022-01-20 21:14:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-20 21:14:41 +0100 |
| commit | 7b8e846d0ab1a95c4070c3d89e38180895e536c6 (patch) | |
| tree | 8ac4fee6c918e4586a333d808173d4b20ee24c5b /Source/Core/VideoCommon/XFStructs.cpp | |
| parent | 73bcf9c24bff56e562f120d2c1c02fb734e17dfd (diff) | |
| parent | fd04f4f32dcb322e3efa51400ed8638a8beb288f (diff) | |
Merge pull request #10367 from Pokechu22/fmt-8.1.1
Update to fmt 8.1.1
Diffstat (limited to 'Source/Core/VideoCommon/XFStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/XFStructs.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/XFStructs.cpp b/Source/Core/VideoCommon/XFStructs.cpp index 665e2ac22d..33e148d043 100644 --- a/Source/Core/VideoCommon/XFStructs.cpp +++ b/Source/Core/VideoCommon/XFStructs.cpp @@ -571,8 +571,8 @@ std::pair<std::string, std::string> GetXFTransferInfo(u16 base_address, u8 trans // do not allow writes past registers if (end_address > XFMEM_REGISTERS_END) { - fmt::format_to(name, "Invalid XF Transfer "); - fmt::format_to(desc, "Transfer ends past end of address space\n\n"); + fmt::format_to(std::back_inserter(name), "Invalid XF Transfer "); + fmt::format_to(std::back_inserter(desc), "Transfer ends past end of address space\n\n"); end_address = XFMEM_REGISTERS_END; } @@ -588,30 +588,32 @@ std::pair<std::string, std::string> GetXFTransferInfo(u16 base_address, u8 trans base_address = XFMEM_REGISTERS_START; } - fmt::format_to(name, "Write {} XF mem words at {:04x}", xf_mem_transfer_size, xf_mem_base); + fmt::format_to(std::back_inserter(name), "Write {} XF mem words at {:04x}", + xf_mem_transfer_size, xf_mem_base); for (u32 i = 0; i < xf_mem_transfer_size; i++) { const auto mem_desc = GetXFMemDescription(xf_mem_base + i, Common::swap32(data)); - fmt::format_to(desc, i == 0 ? "{}" : "\n{}", mem_desc); + fmt::format_to(std::back_inserter(desc), "{}{}", i != 0 ? "\n" : "", mem_desc); data += 4; } if (end_address > XFMEM_REGISTERS_START) - fmt::format_to(name, "; "); + fmt::format_to(std::back_inserter(name), "; "); } // write to XF regs if (base_address >= XFMEM_REGISTERS_START) { - fmt::format_to(name, "Write {} XF regs at {:04x}", end_address - base_address, base_address); + fmt::format_to(std::back_inserter(name), "Write {} XF regs at {:04x}", + end_address - base_address, base_address); for (u32 address = base_address; address < end_address; address++) { const u32 value = Common::swap32(data); const auto [regname, regdesc] = GetXFRegInfo(address, value); - fmt::format_to(desc, "{}\n{}\n", regname, regdesc); + fmt::format_to(std::back_inserter(desc), "{}\n{}\n", regname, regdesc); data += 4; } @@ -628,7 +630,7 @@ std::pair<std::string, std::string> GetXFIndexedLoadInfo(CPArray array, u32 inde fmt::memory_buffer written; for (u32 i = 0; i < size; i++) { - fmt::format_to(written, "{}\n", GetXFMemName(address + i)); + fmt::format_to(std::back_inserter(written), "{}\n", GetXFMemName(address + i)); } return std::make_pair(desc, fmt::to_string(written)); |
