changeset 527:61338585e7f7 find-refactoring

integration mainline->find-refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Jul 2024 14:00:35 +0200
parents 451125122692 (current diff) 4dc0ea12d537 (diff)
children 25cfcb752af6 2d3163d992fd
files
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Common/DatabaseManager.cpp	Fri Jul 19 13:59:27 2024 +0200
+++ b/Framework/Common/DatabaseManager.cpp	Fri Jul 19 14:00:35 2024 +0200
@@ -663,13 +663,11 @@
       statement_.reset(GetManager().GetDatabase().Compile(*query));
       assert(statement_.get() != NULL);
 
+      std::unique_ptr<IResult> result(GetTransaction().Execute(*statement_, parameters));
+
       if (withResults)
       {
-        SetResult(GetTransaction().Execute(*statement_, parameters));
-      }
-      else
-      {
-        GetTransaction().Execute(*statement_, parameters);
+        SetResult(result.release());
       }
     }
     catch (Orthanc::OrthancException& e)