From 7aad3e256f42c4506ce61b337a1ec422bf3c003f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 28 Nov 2024 08:58:41 +0000 Subject: [PATCH] Apply clang-format --- .../Backend/chowdsp_ParamHolder.cpp | 1 - .../Backend/chowdsp_PluginStateImpl.cpp | 7 ++++--- .../chowdsp_plugin_state/Backend/chowdsp_StateValue.h | 11 ++++++++--- .../Backend/chowdsp_PresetState.cpp | 2 +- .../chowdsp_presets_v2/Backend/chowdsp_PresetState.h | 2 +- tests/common_tests/chowdsp_json_test/JSONTest.cpp | 2 +- 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/modules/plugin/chowdsp_plugin_state/Backend/chowdsp_ParamHolder.cpp b/modules/plugin/chowdsp_plugin_state/Backend/chowdsp_ParamHolder.cpp index d2daca05..09e3a581 100644 --- a/modules/plugin/chowdsp_plugin_state/Backend/chowdsp_ParamHolder.cpp +++ b/modules/plugin/chowdsp_plugin_state/Backend/chowdsp_ParamHolder.cpp @@ -144,7 +144,6 @@ std::enable_if_t, void> add (others...); } - [[nodiscard]] inline int ParamHolder::count() const noexcept { auto count = static_cast (things.count()); diff --git a/modules/plugin/chowdsp_plugin_state/Backend/chowdsp_PluginStateImpl.cpp b/modules/plugin/chowdsp_plugin_state/Backend/chowdsp_PluginStateImpl.cpp index 7bfe07d2..0903f3a4 100644 --- a/modules/plugin/chowdsp_plugin_state/Backend/chowdsp_PluginStateImpl.cpp +++ b/modules/plugin/chowdsp_plugin_state/Backend/chowdsp_PluginStateImpl.cpp @@ -43,14 +43,15 @@ template typename Serializer::SerializedType PluginStateImpl::serialize (const PluginStateImpl& object) { #if ! CHOWDSP_USE_LEGACY_STATE_SERIALIZATION - return { + return + { #if defined JucePlugin_VersionString { "version", currentPluginVersion }, #else { "version", chowdsp::Version {} }, #endif - { "params", Serializer::template serialize (object.params) }, - { "non-params", Serializer::template serialize (object.nonParams) }, + { "params", Serializer::template serialize (object.params) }, + { "non-params", Serializer::template serialize (object.nonParams) }, }; #else auto serial = Serializer::createBaseElement(); diff --git a/modules/plugin/chowdsp_plugin_state/Backend/chowdsp_StateValue.h b/modules/plugin/chowdsp_plugin_state/Backend/chowdsp_StateValue.h index da0ca1c5..15c5ff9e 100644 --- a/modules/plugin/chowdsp_plugin_state/Backend/chowdsp_StateValue.h +++ b/modules/plugin/chowdsp_plugin_state/Backend/chowdsp_StateValue.h @@ -12,10 +12,15 @@ struct StateValueBase virtual void reset() {} #if CHOWDSP_USE_LEGACY_STATE_SERIALIZATION - virtual void serialize (JSONSerializer::SerializedType&) const {} + virtual void serialize (JSONSerializer::SerializedType&) const + { + } virtual void deserialize (JSONSerializer::DeserializedType) {} #else - [[nodiscard]] virtual nlohmann::json serialize () const { return {}; } + [[nodiscard]] virtual nlohmann::json serialize() const + { + return {}; + } virtual void deserialize (const nlohmann::json&) {} #endif @@ -88,7 +93,7 @@ struct StateValue : StateValueBase } #else /** JSON Serializer */ - [[nodiscard]] nlohmann::json serialize () const override + [[nodiscard]] nlohmann::json serialize() const override { return get(); } diff --git a/modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetState.cpp b/modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetState.cpp index af27fe8e..71b8768b 100644 --- a/modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetState.cpp +++ b/modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetState.cpp @@ -58,7 +58,7 @@ void PresetState::deserialize (JSONSerializer::DeserializedType deserial) set (PresetPtr { deserial }); } #else -nlohmann::json PresetState::serialize () const +nlohmann::json PresetState::serialize() const { if (preset != nullptr) return preset->toJson(); diff --git a/modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetState.h b/modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetState.h index 431573a5..910c5690 100644 --- a/modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetState.h +++ b/modules/plugin/chowdsp_presets_v2/Backend/chowdsp_PresetState.h @@ -49,7 +49,7 @@ class PresetState : public StateValueBase void deserialize (JSONSerializer::DeserializedType deserial) override; #else /** Internal use only! */ - [[nodiscard]] nlohmann::json serialize () const override; + [[nodiscard]] nlohmann::json serialize() const override; /** Internal use only! */ void deserialize (const nlohmann::json& deserial) override; diff --git a/tests/common_tests/chowdsp_json_test/JSONTest.cpp b/tests/common_tests/chowdsp_json_test/JSONTest.cpp index 445644c6..b972c7d4 100644 --- a/tests/common_tests/chowdsp_json_test/JSONTest.cpp +++ b/tests/common_tests/chowdsp_json_test/JSONTest.cpp @@ -25,7 +25,7 @@ TEST_CASE ("JSON Test", "[common][json]") } { const auto badVersion = chowdsp::json::object().get(); - REQUIRE (badVersion == chowdsp::Version{}); + REQUIRE (badVersion == chowdsp::Version {}); } }