mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
Replace std::ostringstream usage with fmt::format
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user