From 4277561aa466cbb2c0af25a0cd9b76c7e0da5e89 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Wed, 21 Jul 2021 16:02:12 +0200 Subject: [PATCH] Reorder Vst3Bridge methods --- src/wine-host/bridges/vst3.cpp | 8 ++++---- src/wine-host/bridges/vst3.h | 30 +++++++++++++++--------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/wine-host/bridges/vst3.cpp b/src/wine-host/bridges/vst3.cpp index cecc7ffb..e283b2f4 100644 --- a/src/wine-host/bridges/vst3.cpp +++ b/src/wine-host/bridges/vst3.cpp @@ -1202,10 +1202,6 @@ void Vst3Bridge::handle_x11_events() noexcept { } } -void Vst3Bridge::close_sockets() { - sockets.close(); -} - void Vst3Bridge::register_context_menu(Vst3ContextMenuProxyImpl& context_menu) { std::lock_guard lock(object_instances.at(context_menu.owner_instance_id()) .registered_context_menus_mutex); @@ -1225,6 +1221,10 @@ void Vst3Bridge::unregister_context_menu(size_t object_instance_id, .registered_context_menus.erase(context_menu_id); } +void Vst3Bridge::close_sockets() { + sockets.close(); +} + size_t Vst3Bridge::generate_instance_id() noexcept { return current_instance_id.fetch_add(1); } diff --git a/src/wine-host/bridges/vst3.h b/src/wine-host/bridges/vst3.h index 363db02c..6da16c12 100644 --- a/src/wine-host/bridges/vst3.h +++ b/src/wine-host/bridges/vst3.h @@ -292,6 +292,21 @@ class Vst3Bridge : public HostBridge { void handle_x11_events() noexcept override; + /** + * Register a context with with `context_menu`'s ID and owner in + * `object_instances`. This will be called during the constructor of + * `Vst3ContextMenuProxyImpl` so we can refer to the exact instance later. + */ + void register_context_menu(Vst3ContextMenuProxyImpl& context_menu); + + /** + * Remove a previously registered context menu from `object_instances`. This + * is called from the destructor of `Vst3ContextMenuProxyImpl` just before + * the object gets freed. + */ + void unregister_context_menu(size_t object_instance_id, + size_t context_menu_id); + protected: void close_sockets() override; @@ -391,21 +406,6 @@ class Vst3Bridge : public HostBridge { } } - /** - * Register a context with with `context_menu`'s ID and owner in - * `object_instances`. This will be called during the constructor of - * `Vst3ContextMenuProxyImpl` so we can refer to the exact instance later. - */ - void register_context_menu(Vst3ContextMenuProxyImpl& context_menu); - - /** - * Remove a previously registered context menu from `object_instances`. This - * is called from the destructor of `Vst3ContextMenuProxyImpl` just before - * the object gets freed. - */ - void unregister_context_menu(size_t object_instance_id, - size_t context_menu_id); - /** * A logger instance we'll use to log about failed * `FUnknown::queryInterface` calls, so they can be hidden on verbosity