Misc: Swap most C format strings for fmt

This commit is contained in:
Stenzek
2023-09-21 00:32:39 +10:00
parent 92440bdfcf
commit 184b0a1a52
19 changed files with 107 additions and 116 deletions

View File

@ -748,7 +748,7 @@ void CheatManagerDialog::addToWatchClicked()
for (int index = indexFirst; index <= indexLast; index++)
{
const MemoryScan::Result& res = m_scanner.GetResults()[static_cast<u32>(index)];
m_watch.AddEntry(StringUtil::StdStringFromFormat("0x%08x", res.address), res.address, m_scanner.GetSize(),
m_watch.AddEntry(fmt::format("0x{:08x}", res.address), res.address, m_scanner.GetSize(),
m_scanner.GetValueSigned(), false);
updateWatch();
}
@ -775,7 +775,7 @@ void CheatManagerDialog::addManualWatchAddressClicked()
else if (index == 2 || index == 5)
address.value() &= 0xFFFFFFFC;
m_watch.AddEntry(StringUtil::StdStringFromFormat("0x%08x", address.value()), address.value(),
m_watch.AddEntry(fmt::format("0x{:08x}", address.value()), address.value(),
static_cast<MemoryAccessSize>(index % 3), (index > 3), false);
updateWatch();
}

View File

@ -127,7 +127,7 @@ void MemoryCardSettingsWidget::createPortSettingsUi(SettingsDialog* dialog, int
const MemoryCardType default_value = (index == 0) ? MemoryCardType::PerGameTitle : MemoryCardType::None;
SettingWidgetBinder::BindWidgetToEnumSetting(m_dialog->getSettingsInterface(), ui->memory_card_type, "MemoryCards",
StringUtil::StdStringFromFormat("Card%dType", index + 1),
fmt::format("Card{}Type", index + 1),
&Settings::ParseMemoryCardTypeName, &Settings::GetMemoryCardTypeName,
default_value);
ui->layout->addWidget(new QLabel(tr("Memory Card Type:"), ui->container));