diff --git a/src/audio_core/sink_details.cpp b/src/audio_core/sink_details.cpp index 2bac7e3e19..b85e56e516 100644 --- a/src/audio_core/sink_details.cpp +++ b/src/audio_core/sink_details.cpp @@ -30,7 +30,7 @@ const std::vector g_sink_details = { [] { return std::vector{"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 e7b3a4b01a..abad0f9a53 100644 --- a/src/audio_core/sink_details.h +++ b/src/audio_core/sink_details.h @@ -6,6 +6,8 @@ #include #include +#include +#include #include #include @@ -30,6 +32,6 @@ struct SinkDetails { extern const std::vector g_sink_details; -const SinkDetails& GetSinkDetails(std::string sink_id); +const SinkDetails& GetSinkDetails(std::string_view sink_id); } // namespace AudioCore