summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-09-13 00:24:57 +0200
committerGitHub <noreply@github.com>2018-09-13 00:24:57 +0200
commit60899b80f089c5c9a3add7c9cee885900b88f8eb (patch)
tree6edcde5a2dd95c748c7c0c2be6d2b0dd434c6ac8
parentMerge pull request #1302 from lioncash/config (diff)
parentaudio_core/sink_details: Change std::string parameter into std::string_view (diff)
downloadyuzu-60899b80f089c5c9a3add7c9cee885900b88f8eb.tar
yuzu-60899b80f089c5c9a3add7c9cee885900b88f8eb.tar.gz
yuzu-60899b80f089c5c9a3add7c9cee885900b88f8eb.tar.bz2
yuzu-60899b80f089c5c9a3add7c9cee885900b88f8eb.tar.lz
yuzu-60899b80f089c5c9a3add7c9cee885900b88f8eb.tar.xz
yuzu-60899b80f089c5c9a3add7c9cee885900b88f8eb.tar.zst
yuzu-60899b80f089c5c9a3add7c9cee885900b88f8eb.zip
Diffstat (limited to '')
-rw-r--r--src/audio_core/sink_details.cpp2
-rw-r--r--src/audio_core/sink_details.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/audio_core/sink_details.cpp b/src/audio_core/sink_details.cpp
index 955ba20fb..67cf1f3b2 100644
--- a/src/audio_core/sink_details.cpp
+++ b/src/audio_core/sink_details.cpp
@@ -24,7 +24,7 @@ const std::vector<SinkDetails> g_sink_details = {
[] { return std::vector<std::string>{"null"}; }},
};
-const SinkDetails& GetSinkDetails(std::string sink_id) {
+const SinkDetails& GetSinkDetails(std::string_view sink_id) {
auto iter =
std::find_if(g_sink_details.begin(), g_sink_details.end(),
[sink_id](const auto& sink_detail) { return sink_detail.id == sink_id; });
diff --git a/src/audio_core/sink_details.h b/src/audio_core/sink_details.h
index ea666c554..03534b187 100644
--- a/src/audio_core/sink_details.h
+++ b/src/audio_core/sink_details.h
@@ -6,6 +6,8 @@
#include <functional>
#include <memory>
+#include <string>
+#include <string_view>
#include <utility>
#include <vector>
@@ -30,6 +32,6 @@ struct SinkDetails {
extern const std::vector<SinkDetails> g_sink_details;
-const SinkDetails& GetSinkDetails(std::string sink_id);
+const SinkDetails& GetSinkDetails(std::string_view sink_id);
} // namespace AudioCore