From ffabb6c57b59c6ceafd154681c2cde1bd1a65904 Mon Sep 17 00:00:00 2001 From: get <45425365+Minty-Meeo@users.noreply.github.com> Date: Sat, 17 Jun 2023 19:23:49 -0500 Subject: Replace std::ostringstream usage with fmt::format --- Source/Core/Common/Debug/Watches.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Source/Core/Common/Debug/Watches.cpp') diff --git a/Source/Core/Common/Debug/Watches.cpp b/Source/Core/Common/Debug/Watches.cpp index dddb3f3435..c476665a41 100644 --- a/Source/Core/Common/Debug/Watches.cpp +++ b/Source/Core/Common/Debug/Watches.cpp @@ -7,6 +7,8 @@ #include #include +#include + namespace Common::Debug { Watch::Watch(u32 address_, std::string name_, State is_enabled_) @@ -107,13 +109,9 @@ void Watches::LoadFromStrings(const std::vector& watches) std::vector Watches::SaveToStrings() const { std::vector watches; + watches.reserve(m_watches.size()); for (const auto& watch : m_watches) - { - std::ostringstream ss; - ss.imbue(std::locale::classic()); - ss << std::hex << watch.address << " " << watch.name; - watches.push_back(ss.str()); - } + watches.emplace_back(fmt::format("{:x} {}", watch.address, watch.name)); return watches; } -- cgit v1.2.3