diff Framework/Common/DatabaseManager.cpp @ 297:86265ef5f3e3

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 01 Jul 2021 11:31:16 +0200
parents 29d2b76516f6
children 87f0e29a1dc1
line wrap: on
line diff
--- a/Framework/Common/DatabaseManager.cpp	Wed Jun 30 10:33:32 2021 +0200
+++ b/Framework/Common/DatabaseManager.cpp	Thu Jul 01 11:31:16 2021 +0200
@@ -24,7 +24,6 @@
 #include "Integer64Value.h"
 #include "BinaryStringValue.h"
 #include "Utf8StringValue.h"
-#include "../../Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h"
 
 #include <Compatibility.h>  // For std::unique_ptr<>
 #include <Logging.h>
@@ -61,16 +60,8 @@
     
   void DatabaseManager::CloseIfUnavailable(Orthanc::ErrorCode e)
   {
-    bool failure;
-
-#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2)
-    failure = (e != Orthanc::ErrorCode_Success &&
-               e != Orthanc::ErrorCode_DatabaseCannotSerialize);
-#else
-    failure = (e != Orthanc::ErrorCode_Success);
-#endif
-
-    if (failure)
+    if (e != Orthanc::ErrorCode_Success &&
+        e != Orthanc::ErrorCode_DatabaseCannotSerialize)
     {
       transaction_.reset(NULL);
     }