Core: Replace usages of StringFromFormat with fmt where applicable

Migrates usages of StringFromFormat over to using fmt.
This commit is contained in:
Lioncash
2019-10-20 07:35:11 -04:00
parent 6282b0d83e
commit febd1c3dba
30 changed files with 192 additions and 165 deletions

View File

@ -15,6 +15,7 @@
#include <type_traits>
#include <vector>
#include <fmt/format.h>
#include <lzo/lzo1x.h>
#include <mbedtls/md5.h>
@ -849,7 +850,7 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
packet >> is_slot_a >> file_count;
const std::string path = File::GetUserPath(D_GCUSER_IDX) + GC_MEMCARD_NETPLAY DIR_SEP +
StringFromFormat("Card %c", is_slot_a ? 'A' : 'B');
fmt::format("Card {}", is_slot_a ? 'A' : 'B');
if ((File::Exists(path) && !File::DeleteDirRecursively(path + DIR_SEP)) ||
!File::CreateFullPath(path + DIR_SEP))
@ -1235,9 +1236,8 @@ void NetPlayClient::DisplayPlayersPing()
if (!g_ActiveConfig.bShowNetPlayPing)
return;
OSD::AddTypedMessage(OSD::MessageType::NetPlayPing,
StringFromFormat("Ping: %u", GetPlayersMaxPing()), OSD::Duration::SHORT,
OSD::Color::CYAN);
OSD::AddTypedMessage(OSD::MessageType::NetPlayPing, fmt::format("Ping: {}", GetPlayersMaxPing()),
OSD::Duration::SHORT, OSD::Color::CYAN);
}
u32 NetPlayClient::GetPlayersMaxPing() const