Deduplicate CLAP extension support queries

They're only queried once now and the booleans are derived from the
stored pointers.
This commit is contained in:
Robbert van der Helm
2022-09-12 18:42:52 +02:00
parent b31bee24b6
commit 51edef4427
8 changed files with 48 additions and 40 deletions
-3
View File
@@ -28,8 +28,5 @@ Host::Host(const clap_host_t& original)
url(original.url ? std::optional(original.url) : std::nullopt),
version((assert(original.version), original.version)) {}
SupportedHostExtensions::SupportedHostExtensions(const clap_host& host)
: supports_audio_ports(host.get_extension(&host, CLAP_EXT_AUDIO_PORTS)) {}
} // namespace host
} // namespace clap