From 5ef56349ecc7d68bdb66b4808978dd2aef34cda1 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Thu, 14 May 2020 14:14:43 +0200
Subject: [PATCH] createDomainSimulation: no need for pointers around models

---
 .../GUI/GUIStandardTest/GUIStandardTest.cpp   | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/Tests/Functional/GUI/GUIStandardTest/GUIStandardTest.cpp b/Tests/Functional/GUI/GUIStandardTest/GUIStandardTest.cpp
index 8d8e89de0f9..4a080c995c7 100644
--- a/Tests/Functional/GUI/GUIStandardTest/GUIStandardTest.cpp
+++ b/Tests/Functional/GUI/GUIStandardTest/GUIStandardTest.cpp
@@ -28,19 +28,19 @@ namespace
 std::unique_ptr<Simulation> createDomainSimulation(const Simulation& origin)
 {
     // initializing necessary GUI
-    const std::unique_ptr<DocumentModel> documentModel(new DocumentModel);
-    const std::unique_ptr<SampleModel> sampleModel(new SampleModel);
-    const std::unique_ptr<InstrumentModel> instrumentModel(new InstrumentModel);
-    const std::unique_ptr<MaterialModel> materialModel(new MaterialModel);
+    DocumentModel documentModel;
+    SampleModel sampleModel;
+    InstrumentModel instrumentModel;
+    MaterialModel materialModel;
 
     // populating GUI models from domain
-    GUIObjectBuilder::populateSampleModelFromSim(sampleModel.get(), materialModel.get(), origin);
-    GUIObjectBuilder::populateInstrumentModel(instrumentModel.get(), origin);
-    GUIObjectBuilder::populateDocumentModel(documentModel.get(), origin);
+    GUIObjectBuilder::populateSampleModelFromSim(&sampleModel, &materialModel, origin);
+    GUIObjectBuilder::populateInstrumentModel(&instrumentModel, origin);
+    GUIObjectBuilder::populateDocumentModel(&documentModel, origin);
 
-    auto result = DomainSimulationBuilder::createSimulation(sampleModel->multiLayerItem(),
-                                                            instrumentModel->instrumentItem(),
-                                                            documentModel->simulationOptionsItem());
+    auto result = DomainSimulationBuilder::createSimulation(sampleModel.multiLayerItem(),
+                                                            instrumentModel.instrumentItem(),
+                                                            documentModel.simulationOptionsItem());
 
     return result;
 }
-- 
GitLab