diff SQLite/Plugins/IndexPlugin.cpp @ 213:c2e4a909de0e

added IndexBackend::Register() to be used in all the index plugins
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 24 Mar 2021 15:59:23 +0100
parents 821d4ba83dc3
children c8e06b41feec
line wrap: on
line diff
--- a/SQLite/Plugins/IndexPlugin.cpp	Wed Mar 24 15:47:14 2021 +0100
+++ b/SQLite/Plugins/IndexPlugin.cpp	Wed Mar 24 15:59:23 2021 +0100
@@ -66,23 +66,7 @@
       backend_.reset(new OrthancDatabases::SQLiteIndex(context, "index.db"));  // TODO parameter
 
       /* Register the SQLite index into Orthanc */
-
-      bool hasLoadedV3 = false;
-      
-#if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE)         // Macro introduced in Orthanc 1.3.1
-#  if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2)
-      if (OrthancPluginCheckVersionAdvanced(context, 1, 9, 2) == 1)
-      {
-        OrthancDatabases::DatabaseBackendAdapterV3::Register(*backend_);
-        hasLoadedV3 = true;
-      }
-#  endif
-#endif
-
-      if (!hasLoadedV3)
-      {
-        OrthancDatabases::DatabaseBackendAdapterV2::Register(*backend_);
-      }
+      OrthancDatabases::IndexBackend::Register(*backend_);
     }
     catch (Orthanc::OrthancException& e)
     {