Skip to content

Commit

Permalink
edit '{include,src,test}/StoneyVCV/plugin.{cpp,hpp}' - remove unused …
Browse files Browse the repository at this point in the history
…version toggling stuff

Signed-off-by: StoneyDSP <[email protected]>
  • Loading branch information
nathanjhood committed Jan 6, 2025
1 parent 17ec046 commit 7cc1137
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 109 deletions.
128 changes: 60 additions & 68 deletions include/StoneyVCV/plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,74 +101,66 @@ extern ::rack::plugin::Plugin* pluginInstance;

// Declare each Model, defined in each module source file

#if (STONEYVCV_VERSION_MAJOR >= 2U) && (STONEYVCV_VERSION_MINOR >= 0U) && (STONEYVCV_VERSION_PATCH >= 2U)

#if defined (STONEYVCV_BUILD_VCA)
namespace VCA {
/** @addtogroup VCA
* @{
*/

/**
* @brief Declaration of the `VCA` Model instance, defined in `VCA.cpp`.
*/
extern ::rack::plugin::Model* modelVCA;

/// @} group VCA
} // namespace VCA
#endif // STONEYVCV_BUILD_VCA

#endif // STONEYVCV_VERSION_PATCH >= 2

#if (STONEYVCV_VERSION_MAJOR >= 2U) && (STONEYVCV_VERSION_MINOR >= 0U) && (STONEYVCV_VERSION_PATCH >= 1U)

#if defined (STONEYVCV_BUILD_HP4)
namespace HP4 {
/** @addtogroup HP4
* @{
*/

/**
* @brief Declaration of the `HP4` Model instance, defined in `HP4.cpp`.
*/
extern ::rack::plugin::Model* modelHP4;


/// @} group HP4
} // namespace HP4
#endif // STONEYVCV_BUILD_HP4

#if defined (STONEYVCV_BUILD_HP2)
namespace HP2 {
/** @addtogroup HP2
* @{
*/

/**
* @brief Declaration of the `HP2` Model instance, defined in `HP2.cpp`.
*/
extern ::rack::plugin::Model* modelHP2;

/// @} group HP1
} // namespace HP1
#endif // STONEYVCV_BUILD_HP2

#if defined (STONEYVCV_BUILD_HP1)
namespace HP1 {
/** @addtogroup HP1
* @{
*/

/**
* @brief Declaration of the `HP1` Model instance, defined in `HP1.cpp`.
*/
extern ::rack::plugin::Model* modelHP1;

/// @} group HP1
} // namespace HP1
#endif // STONEYVCV_BUILD_HP1

#endif
#if defined (STONEYVCV_BUILD_VCA)
namespace VCA {
/** @addtogroup VCA
* @{
*/

/**
* @brief Declaration of the `VCA` Model instance, defined in `VCA.cpp`.
*/
extern ::rack::plugin::Model* modelVCA;

/// @} group VCA
} // namespace VCA
#endif // STONEYVCV_BUILD_VCA

#if defined (STONEYVCV_BUILD_HP4)
namespace HP4 {
/** @addtogroup HP4
* @{
*/

/**
* @brief Declaration of the `HP4` Model instance, defined in `HP4.cpp`.
*/
extern ::rack::plugin::Model* modelHP4;


/// @} group HP4
} // namespace HP4
#endif // STONEYVCV_BUILD_HP4

#if defined (STONEYVCV_BUILD_HP2)
namespace HP2 {
/** @addtogroup HP2
* @{
*/

/**
* @brief Declaration of the `HP2` Model instance, defined in `HP2.cpp`.
*/
extern ::rack::plugin::Model* modelHP2;

/// @} group HP1
} // namespace HP1
#endif // STONEYVCV_BUILD_HP2

#if defined (STONEYVCV_BUILD_HP1)
namespace HP1 {
/** @addtogroup HP1
* @{
*/

/**
* @brief Declaration of the `HP1` Model instance, defined in `HP1.cpp`.
*/
extern ::rack::plugin::Model* modelHP1;

/// @} group HP1
} // namespace HP1
#endif // STONEYVCV_BUILD_HP1

#if (STONEYVCV_VERSION_MAJOR >= 2U) && (STONEYVCV_VERSION_MINOR >= 0U) && (STONEYVCV_VERSION_PATCH < 1U)
#warning "No modules found..."
Expand Down
30 changes: 11 additions & 19 deletions src/StoneyVCV/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,20 @@ void init(::rack::plugin::Plugin* p) {

::StoneyDSP::StoneyVCV::Plugin::pluginInstance = p;

#if (STONEYVCV_VERSION_MAJOR >= 2U) && (STONEYVCV_VERSION_MINOR >= 0) && (STONEYVCV_VERSION_PATCH >= 2)

#ifdef STONEYVCV_BUILD_VCA
p->addModel(::StoneyDSP::StoneyVCV::VCA::modelVCA);
#endif

#endif // STONEYVCV_VERSION_PATCH >= 2

#if (STONEYVCV_VERSION_MAJOR >= 2U) && (STONEYVCV_VERSION_MINOR >= 0) && (STONEYVCV_VERSION_PATCH >= 1)

#ifdef STONEYVCV_BUILD_HP4
p->addModel(::StoneyDSP::StoneyVCV::HP4::modelHP4);
#endif
#ifdef STONEYVCV_BUILD_VCA
p->addModel(::StoneyDSP::StoneyVCV::VCA::modelVCA);
#endif

#ifdef STONEYVCV_BUILD_HP2
p->addModel(::StoneyDSP::StoneyVCV::HP2::modelHP2);
#endif
#ifdef STONEYVCV_BUILD_HP4
p->addModel(::StoneyDSP::StoneyVCV::HP4::modelHP4);
#endif

#ifdef STONEYVCV_BUILD_HP1
p->addModel(::StoneyDSP::StoneyVCV::HP1::modelHP1);
#endif
#ifdef STONEYVCV_BUILD_HP2
p->addModel(::StoneyDSP::StoneyVCV::HP2::modelHP2);
#endif

#ifdef STONEYVCV_BUILD_HP1
p->addModel(::StoneyDSP::StoneyVCV::HP1::modelHP1);
#endif

#if (STONEYVCV_VERSION_MAJOR >= 2U) && (STONEYVCV_VERSION_MINOR >= 0) && (STONEYVCV_VERSION_PATCH < 1U)
Expand Down
40 changes: 18 additions & 22 deletions test/StoneyVCV/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,30 +57,26 @@ TEST_CASE("plugin", "[plugin]") {
#endif
#endif

#if (STONEYVCV_VERSION_MAJOR >= 2U) && (STONEYVCV_VERSION_MINOR >= 0U) && (STONEYVCV_VERSION_PATCH >= 2U)
#ifdef STONEYVCV_BUILD_VCA
SECTION( "VCA" ) {
REQUIRE(::StoneyDSP::StoneyVCV::VCA::modelVCA != nullptr);
}
#endif
#ifdef STONEYVCV_BUILD_VCA
SECTION( "VCA" ) {
REQUIRE(::StoneyDSP::StoneyVCV::VCA::modelVCA != nullptr);
}
#endif

#if (STONEYVCV_VERSION_MAJOR >= 2U) && (STONEYVCV_VERSION_MINOR >= 0U) && (STONEYVCV_VERSION_PATCH >= 1U)
#ifdef STONEYVCV_BUILD_HP4
SECTION( "HP4" ) {
REQUIRE(::StoneyDSP::StoneyVCV::HP4::modelHP4 != nullptr);
}
#endif
#ifdef STONEYVCV_BUILD_HP2
SECTION( "HP2" ) {
REQUIRE(::StoneyDSP::StoneyVCV::HP2::modelHP2 != nullptr);
}
#endif
#ifdef STONEYVCV_BUILD_HP1
SECTION( "HP1" ) {
REQUIRE(::StoneyDSP::StoneyVCV::HP1::modelHP1 != nullptr);
}
#endif
#ifdef STONEYVCV_BUILD_HP4
SECTION( "HP4" ) {
REQUIRE(::StoneyDSP::StoneyVCV::HP4::modelHP4 != nullptr);
}
#endif
#ifdef STONEYVCV_BUILD_HP2
SECTION( "HP2" ) {
REQUIRE(::StoneyDSP::StoneyVCV::HP2::modelHP2 != nullptr);
}
#endif
#ifdef STONEYVCV_BUILD_HP1
SECTION( "HP1" ) {
REQUIRE(::StoneyDSP::StoneyVCV::HP1::modelHP1 != nullptr);
}
#endif

#if (STONEYVCV_VERSION_MAJOR >= 2U) && (STONEYVCV_VERSION_MINOR >= 0U) && (STONEYVCV_VERSION_PATCH < 1U)
Expand Down

0 comments on commit 7cc1137

Please sign in to comment.