UICommon: Make use of fmt where applicable

Continues the migration to using fmt.

Notably, this allows safely converting a map within USBUtils over to
containing string view instances, rather than std::string instances, as
fmt safely handles the formatting of string views.
This commit is contained in:
Lioncash
2019-11-23 19:15:52 -05:00
parent ec895f544c
commit b28db1d4e6
7 changed files with 36 additions and 25 deletions

View File

@ -13,6 +13,8 @@
#include <sys/wait.h>
#include <unistd.h>
#include <fmt/format.h>
#include "Common/Logging/Log.h"
#include "Common/StringUtil.h"
#include "Core/Config/MainSettings.h"
@ -156,7 +158,7 @@ void XRRConfiguration::Update()
output_name = strdup(output_info->name);
Config::SetBaseOrCurrent(
Config::MAIN_FULLSCREEN_DISPLAY_RES,
StringFromFormat("%s: %ux%u", output_info->name, fullWidth, fullHeight));
fmt::format("{}: {}x{}", output_info->name, fullWidth, fullHeight));
}
outputInfo = output_info;
crtcInfo = crtc_info;