summaryrefslogtreecommitdiff
path: root/Source/Core/UICommon/GameFile.cpp
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-09-27 22:30:19 -0700
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-10-19 12:18:16 -0700
commit4c064de235e4e45cd8756a02960373231cb08d49 (patch)
tree7b80b4c15615e6908261e105869bb84bbf4d31fb /Source/Core/UICommon/GameFile.cpp
parent519da8297ce892f9edc215806bb641a6003d623d (diff)
Simplify `std::copy` with `fmt::join`
Diffstat (limited to 'Source/Core/UICommon/GameFile.cpp')
-rw-r--r--Source/Core/UICommon/GameFile.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/Core/UICommon/GameFile.cpp b/Source/Core/UICommon/GameFile.cpp
index 7603463138..6068e1234e 100644
--- a/Source/Core/UICommon/GameFile.cpp
+++ b/Source/Core/UICommon/GameFile.cpp
@@ -10,7 +10,6 @@
#include <iterator>
#include <map>
#include <memory>
-#include <sstream>
#include <string>
#include <string_view>
#include <tuple>
@@ -18,6 +17,7 @@
#include <vector>
#include <fmt/format.h>
+#include <fmt/ranges.h>
#include <pugixml.hpp>
#include "Common/BitUtils.h"
@@ -643,10 +643,7 @@ std::string GameFile::GetNetPlayName(const Core::TitleDatabase& title_database)
}
if (info.empty())
return name;
- std::ostringstream ss;
- std::copy(info.begin(), info.end() - 1, std::ostream_iterator<std::string>(ss, ", "));
- ss << info.back();
- return name + " (" + ss.str() + ")";
+ return fmt::format("{} ({})", name, fmt::join(info, ", "));
}
static Common::SHA1::Digest GetHash(u32 value)