From aa00388462c6e8249b2896848b6e0b83dfd41410 Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Thu, 28 May 2020 11:46:38 +0200
Subject: [PATCH] [GL/IO] Fix: "Loc var 'isBorehole' shadows outer fct".

---
 GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp
index cb5237b6097..465c4cf1fa0 100644
--- a/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp
+++ b/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp
@@ -249,8 +249,8 @@ bool XmlStnInterface::write()
     root.setAttribute( "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance" );
 
     const std::vector<GeoLib::Point*>* stations (_geo_objs.getStationVec(_exportName));
-    bool isBorehole = static_cast<GeoLib::Station*>((*stations)[0])->type() ==
-                      GeoLib::Station::StationType::BOREHOLE;
+    bool const is_borehole = static_cast<GeoLib::Station*>((*stations)[0])->type() ==
+                       GeoLib::Station::StationType::BOREHOLE;
 
     doc.appendChild(root);
     QDomElement stationListTag = doc.createElement("stationlist");
@@ -260,7 +260,7 @@ bool XmlStnInterface::write()
     stationListTag.appendChild(listNameTag);
     QDomText stationListNameText = doc.createTextNode(QString::fromStdString(_exportName));
     listNameTag.appendChild(stationListNameText);
-    QString listType = (isBorehole) ? "boreholes" : "stations";
+    QString listType = is_borehole ? "boreholes" : "stations";
     QDomElement stationsTag = doc.createElement(listType);
     stationListTag.appendChild(stationsTag);
 
@@ -279,7 +279,7 @@ bool XmlStnInterface::write()
 
     for (std::size_t i = 0; i < nStations; i++)
     {
-        QString stationType =  (isBorehole) ? "borehole" : "station";
+        QString stationType =  is_borehole ? "borehole" : "station";
         QDomElement stationTag = doc.createElement(stationType);
         stationTag.setAttribute( "id", QString::number(i) );
         stationTag.setAttribute( "x",  QString::number((*(*stations)[i])[0], 'f',
@@ -305,7 +305,7 @@ bool XmlStnInterface::write()
             stationValueTag.appendChild(stationValueText);
         }
 
-        if (isBorehole)
+        if (is_borehole)
         {
             writeBoreholeData(
                 doc, stationTag,
-- 
GitLab