Move supported extensions lists out of logger

Keeping this next to the supported extensions objects makes it easier to
maintain.
This commit is contained in:
Robbert van der Helm
2022-09-26 17:40:34 +02:00
parent 436efeae56
commit 53c9fbb376
6 changed files with 35 additions and 18 deletions
+2 -14
View File
@@ -80,14 +80,8 @@ bool ClapLogger::log_request(bool is_host_plugin,
<< ": clap_plugin::init(), supported host extensions: ";
bool first = true;
const auto& supported_extensions = request.supported_host_extensions;
for (const auto& [supported, extension_name] :
{std::pair(supported_extensions.supports_audio_ports,
CLAP_EXT_AUDIO_PORTS),
std::pair(supported_extensions.supports_note_ports,
CLAP_EXT_NOTE_PORTS),
std::pair(supported_extensions.supports_params,
CLAP_EXT_PARAMS)}) {
request.supported_host_extensions.list()) {
if (!supported) {
continue;
}
@@ -393,14 +387,8 @@ void ClapLogger::log_response(bool is_host_plugin,
<< ", supported plugin extensions: ";
bool first = true;
const auto& supported_extensions = response.supported_plugin_extensions;
for (const auto& [supported, extension_name] :
{std::pair(supported_extensions.supports_audio_ports,
CLAP_EXT_AUDIO_PORTS),
std::pair(supported_extensions.supports_note_ports,
CLAP_EXT_NOTE_PORTS),
std::pair(supported_extensions.supports_params,
CLAP_EXT_PARAMS)}) {
response.supported_plugin_extensions.list()) {
if (!supported) {
continue;
}