From 4c064de235e4e45cd8756a02960373231cb08d49 Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Fri, 27 Sep 2024 22:30:19 -0700 Subject: [PATCH] Simplify `std::copy` with `fmt::join` --- Source/Core/UICommon/GameFile.cpp | 7 ++----- 1 file 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 #include #include -#include #include #include #include @@ -18,6 +17,7 @@ #include #include +#include #include #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(ss, ", ")); - ss << info.back(); - return name + " (" + ss.str() + ")"; + return fmt::format("{} ({})", name, fmt::join(info, ", ")); } static Common::SHA1::Digest GetHash(u32 value)