aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/pulseaudio.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-01 13:12:42 -0700
committerChris Robinson <[email protected]>2018-11-01 13:12:42 -0700
commit69162cf9c6dcf938d5c7d1f949f307142604c65a (patch)
treed8a3c0de27dfd997d329a260ede862600b0df165 /Alc/backends/pulseaudio.cpp
parentcd68530ab4d340d61f524ea2d03176ed775e4e68 (diff)
Use perfect forwarding to initialize DevMap entries
Diffstat (limited to 'Alc/backends/pulseaudio.cpp')
-rw-r--r--Alc/backends/pulseaudio.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Alc/backends/pulseaudio.cpp b/Alc/backends/pulseaudio.cpp
index a6f6564d..15f02e1a 100644
--- a/Alc/backends/pulseaudio.cpp
+++ b/Alc/backends/pulseaudio.cpp
@@ -510,8 +510,9 @@ struct DevMap {
std::string name;
std::string device_name;
- DevMap(std::string name_, std::string devname_)
- : name{std::move(name_)}, device_name{std::move(devname_)}
+ template<typename StrT0, typename StrT1>
+ DevMap(StrT0&& name_, StrT1&& devname_)
+ : name{std::forward<StrT0>(name_)}, device_name{std::forward<StrT1>(devname_)}
{ }
};
@@ -1331,7 +1332,7 @@ static void PulseCapture_deviceCallback(pa_context *UNUSED(context), const pa_so
newname += " #";
newname += std::to_string(++count);
}
- CaptureDevices.emplace_back(std::move(newname), std::string{info->name});
+ CaptureDevices.emplace_back(std::move(newname), info->name);
DevMap &newentry = CaptureDevices.back();
TRACE("Got device \"%s\", \"%s\"\n", newentry.name.c_str(), newentry.device_name.c_str());