From c6100390251699eddd76998509703f4826c427fa Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Fri, 13 Aug 2021 01:51:31 +0200
Subject: [PATCH] WIP: files

---
 include/caosdb/transaction.h | 1 -
 src/caosdb/transaction.cpp   | 7 ++++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/caosdb/transaction.h b/include/caosdb/transaction.h
index a873a93..3d394a1 100644
--- a/include/caosdb/transaction.h
+++ b/include/caosdb/transaction.h
@@ -36,7 +36,6 @@
 #include <iterator>                         // for iterator, next
 #include <map>                              // for map
 #include <memory>                           // for unique_ptr
-#include <stdexcept>                        // for out_of_range
 #include <string>                           // for string
 #include <utility>                          // for move
 #include <vector>                           // for vector
diff --git a/src/caosdb/transaction.cpp b/src/caosdb/transaction.cpp
index af6c0f7..bc4b4d6 100644
--- a/src/caosdb/transaction.cpp
+++ b/src/caosdb/transaction.cpp
@@ -465,13 +465,14 @@ auto Transaction::WaitForIt() const noexcept -> TransactionStatus {
         this->query_count = retrieve_response->count_result();
       } break;
       case RetrieveResponseCase::kFindResult: {
+        std::unique_ptr<Entity> find_result;
         for (auto &entity_response :
              *retrieve_response->mutable_find_result()->mutable_result_set()) {
-          result = std::make_unique<Entity>(&entity_response);
-          if (result->HasErrors()) {
+          find_result = std::make_unique<Entity>(&entity_response);
+          if (find_result->HasErrors()) {
             set_error = true;
           }
-          entities.push_back(std::move(result));
+          entities.push_back(std::move(find_result));
         }
       } break;
       default:
-- 
GitLab