diff options
| author | get <45425365+Minty-Meeo@users.noreply.github.com> | 2023-06-17 19:23:49 -0500 |
|---|---|---|
| committer | get <45425365+Minty-Meeo@users.noreply.github.com> | 2023-06-18 18:37:32 -0500 |
| commit | ffabb6c57b59c6ceafd154681c2cde1bd1a65904 (patch) | |
| tree | 05eb0486ca6620cdd18af9b65000bfa5be6ad104 /Source/Core/Common/Debug | |
| parent | 44498872e9dbf0c3d14397df2b4255ac2efe0f11 (diff) | |
Replace std::ostringstream usage with fmt::format
Diffstat (limited to 'Source/Core/Common/Debug')
| -rw-r--r-- | Source/Core/Common/Debug/Watches.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
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 <locale> #include <sstream> +#include <fmt/format.h> + namespace Common::Debug { Watch::Watch(u32 address_, std::string name_, State is_enabled_) @@ -107,13 +109,9 @@ void Watches::LoadFromStrings(const std::vector<std::string>& watches) std::vector<std::string> Watches::SaveToStrings() const { std::vector<std::string> 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; } |
