Mercurial > hg > orthanc-databases
changeset 549:e620f36b8e09
removed unnecessary macro ORTHANC_ENABLE_PLUGINS
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 09 Sep 2024 13:29:45 +0200 |
parents | 25005693297b |
children | 9ed9a91bde33 1a23f1ce3b98 |
files | Framework/Plugins/DatabaseConstraint.cpp Framework/Plugins/DatabaseConstraint.h Framework/Plugins/ISqlLookupFormatter.h Resources/CMake/DatabasesPluginConfiguration.cmake |
diffstat | 4 files changed, 6 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Plugins/DatabaseConstraint.cpp Mon Sep 09 13:22:44 2024 +0200 +++ b/Framework/Plugins/DatabaseConstraint.cpp Mon Sep 09 13:29:45 2024 +0200 @@ -39,7 +39,6 @@ { namespace Plugins { -#if ORTHANC_ENABLE_PLUGINS == 1 OrthancPluginResourceType Convert(ResourceType type) { switch (type) @@ -60,10 +59,8 @@ throw OrthancException(ErrorCode_ParameterOutOfRange); } } -#endif -#if ORTHANC_ENABLE_PLUGINS == 1 ResourceType Convert(OrthancPluginResourceType type) { switch (type) @@ -84,7 +81,6 @@ throw OrthancException(ErrorCode_ParameterOutOfRange); } } -#endif #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1
--- a/Framework/Plugins/DatabaseConstraint.h Mon Sep 09 13:22:44 2024 +0200 +++ b/Framework/Plugins/DatabaseConstraint.h Mon Sep 09 13:29:45 2024 +0200 @@ -30,15 +30,14 @@ #pragma once +#include <orthanc/OrthancCDatabasePlugin.h> + #define ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT 0 -#if ORTHANC_ENABLE_PLUGINS == 1 -# include <orthanc/OrthancCDatabasePlugin.h> -# if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in 1.3.1 -# if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 2) -# undef ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT -# define ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT 1 -# endif +#if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in 1.3.1 +# if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 5, 2) +# undef ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT +# define ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT 1 # endif #endif @@ -59,13 +58,9 @@ namespace Plugins { -#if ORTHANC_ENABLE_PLUGINS == 1 OrthancPluginResourceType Convert(ResourceType type); -#endif -#if ORTHANC_ENABLE_PLUGINS == 1 ResourceType Convert(OrthancPluginResourceType type); -#endif #if ORTHANC_PLUGINS_HAS_DATABASE_CONSTRAINT == 1 OrthancPluginConstraintType Convert(ConstraintType constraint); @@ -77,7 +72,6 @@ } - // This class is also used by the "orthanc-databases" project class DatabaseConstraint : public boost::noncopyable { private:
--- a/Framework/Plugins/ISqlLookupFormatter.h Mon Sep 09 13:22:44 2024 +0200 +++ b/Framework/Plugins/ISqlLookupFormatter.h Mon Sep 09 13:29:45 2024 +0200 @@ -46,7 +46,6 @@ LabelsConstraint_None }; - // This class is also used by the "orthanc-databases" project class ISqlLookupFormatter : public boost::noncopyable { public:
--- a/Resources/CMake/DatabasesPluginConfiguration.cmake Mon Sep 09 13:22:44 2024 +0200 +++ b/Resources/CMake/DatabasesPluginConfiguration.cmake Mon Sep 09 13:29:45 2024 +0200 @@ -92,7 +92,6 @@ add_definitions( -DHAS_ORTHANC_EXCEPTION=1 - -DORTHANC_ENABLE_PLUGINS=1 # To build "DatabaseConstraint.h" imported from Orthanc core -DORTHANC_OPTIMAL_VERSION_MAJOR=${ORTHANC_OPTIMAL_VERSION_MAJOR} -DORTHANC_OPTIMAL_VERSION_MINOR=${ORTHANC_OPTIMAL_VERSION_MINOR} -DORTHANC_OPTIMAL_VERSION_REVISION=${ORTHANC_OPTIMAL_VERSION_REVISION}