From 38d44ff15aba1be9662470dd54cf1e1ccddd667d Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Tue, 10 Sep 2019 13:54:11 +0200
Subject: [PATCH] [GL/Station] Use constructor to init object.

---
 Applications/FileIO/GMSInterface.cpp |  3 ++-
 GeoLib/Station.cpp                   | 10 +++-------
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/Applications/FileIO/GMSInterface.cpp b/Applications/FileIO/GMSInterface.cpp
index 68e9520b439..925e851c385 100644
--- a/Applications/FileIO/GMSInterface.cpp
+++ b/Applications/FileIO/GMSInterface.cpp
@@ -75,7 +75,8 @@ int GMSInterface::readBoreholesFromGMS(std::vector<GeoLib::Point*>* boreholes,
                 // later on!
                 if (pnt[2] != depth)
                 {
-                    newBorehole->addSoilLayer(pnt[0], pnt[1], pnt[2], sName);
+                    newBorehole->addSoilLayer(
+                        pnt[0], pnt[1], pnt[2], sName);
                     sName = (*(++it));
                     depth = pnt[2];
                 }
diff --git a/GeoLib/Station.cpp b/GeoLib/Station.cpp
index b43f4bf7eea..58180a03f2a 100644
--- a/GeoLib/Station.cpp
+++ b/GeoLib/Station.cpp
@@ -70,14 +70,10 @@ Station* Station::createStation(const std::string & line)
     return station;
 }
 
-Station* Station::createStation(const std::string &name, double x, double y, double z)
+Station* Station::createStation(const std::string& name, double x, double y,
+                                double z)
 {
-    Station* station = new Station();
-    station->_name = name;
-    (*station)[0] = x;
-    (*station)[1] = y;
-    (*station)[2] = z;
-    return station;
+    return new Station(x, y, z, name);
 }
 
 bool isStation(GeoLib::Point const* pnt)
-- 
GitLab