From dbf00f0ed364da4390eff5efd72af4e47e47810b Mon Sep 17 00:00:00 2001 From: Mike Oliphant Date: Tue, 4 Jul 2023 14:53:39 -0700 Subject: [PATCH] Formatting --- src/nam_lv2.cpp | 5 +++-- src/nam_plugin.cpp | 7 +++++-- src/nam_plugin.h | 1 - 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/nam_lv2.cpp b/src/nam_lv2.cpp index 50ef348..b6e6074 100644 --- a/src/nam_lv2.cpp +++ b/src/nam_lv2.cpp @@ -27,7 +27,7 @@ static LV2_Handle instantiate(const LV2_Descriptor*, double rate, const char*, c return nullptr; } - catch(const std::exception& e) + catch(const std::exception) { return nullptr; } @@ -36,7 +36,8 @@ static LV2_Handle instantiate(const LV2_Descriptor*, double rate, const char*, c static void connect_port(LV2_Handle instance, uint32_t port, void* data) { auto nam = static_cast(instance); - *(reinterpret_cast(&nam->ports)+port) = data; + + *(reinterpret_cast(&nam->ports)+port) = data; } static void activate(LV2_Handle) {} diff --git a/src/nam_plugin.cpp b/src/nam_plugin.cpp index 396353f..f9f6901 100644 --- a/src/nam_plugin.cpp +++ b/src/nam_plugin.cpp @@ -25,7 +25,8 @@ namespace NAM { // for fetching initial options, can be null LV2_Options_Option* options = nullptr; - for (size_t i = 0; features[i]; ++i) { + for (size_t i = 0; features[i]; ++i) + { if (std::string(features[i]->URI) == std::string(LV2_URID__map)) map = static_cast(features[i]->data); else if (std::string(features[i]->URI) == std::string(LV2_WORKER__schedule)) @@ -144,6 +145,7 @@ namespace NAM { { auto msg = static_cast(data); delete msg->model; + return LV2_WORKER_SUCCESS; } @@ -300,7 +302,8 @@ namespace NAM { lv2_log_trace(&nam->logger, "Saving state\n"); - if (!nam->currentModel) { + if (!nam->currentModel) + { return LV2_STATE_SUCCESS; } diff --git a/src/nam_plugin.h b/src/nam_plugin.h index 7968670..e96644d 100644 --- a/src/nam_plugin.h +++ b/src/nam_plugin.h @@ -114,7 +114,6 @@ namespace NAM { LV2_Atom_Forge atom_forge = {}; LV2_Atom_Forge_Frame sequence_frame; - float m_rate; float inputLevel = 0; float outputLevel = 0; int32_t maxBufferSize = 0;