Mercurial > hg > orthanc-databases
changeset 297:86265ef5f3e3
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 01 Jul 2021 11:31:16 +0200 |
parents | 024ec14b9121 |
children | 8f655f308de9 |
files | Framework/Common/DatabaseManager.cpp Framework/Common/DatabasesEnumerations.h Framework/Common/GenericFormatter.cpp |
diffstat | 3 files changed, 4 insertions(+), 11 deletions(-) [+] |
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); }