summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-06-19 02:18:30 +0200
committerGitHub <noreply@github.com>2023-06-19 02:18:30 +0200
commit5d7b5822c97285a1b45f54b2ae8046808cbe54d2 (patch)
tree341d0c17ea3ea9e364cac57ebb1b86270e904528 /Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp
parent9e06b6964b04829d526609b3cf98bca58f80c318 (diff)
parentffabb6c57b59c6ceafd154681c2cde1bd1a65904 (diff)
Merge pull request #11972 from Minty-Meeo/string-improvements-part-1c
Replace std::ostringstream usage with fmt::format
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp b/Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp
index 222791f03f..28b91332cc 100644
--- a/Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/CoreDevice.cpp
@@ -162,15 +162,12 @@ void Device::AddCombinedInput(std::string name, const std::pair<std::string, std
std::string DeviceQualifier::ToString() const
{
if (source.empty() && (cid < 0) && name.empty())
- return "";
+ return {};
- std::ostringstream ss;
- ss << source << '/';
if (cid > -1)
- ss << cid;
- ss << '/' << name;
-
- return ss.str();
+ return fmt::format("{}/{}/{}", source, cid, name);
+ else
+ return fmt::format("{}//{}", source, name);
}
//