From 745275d98b8e48063a867aff360654458887b59c Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Thu, 11 Nov 2021 21:38:30 +0100
Subject: [PATCH] + const

---
 GUI/Model/Job/JobModelFunctions.cpp              | 2 +-
 GUI/View/SampleDesigner/SampleEditorCommands.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/GUI/Model/Job/JobModelFunctions.cpp b/GUI/Model/Job/JobModelFunctions.cpp
index c39f992ff6d..5c6a2146cd7 100644
--- a/GUI/Model/Job/JobModelFunctions.cpp
+++ b/GUI/Model/Job/JobModelFunctions.cpp
@@ -165,7 +165,7 @@ void GUI::Model::JobFunctions::setupJobItemInstrument(JobItem* jobItem, const In
     spec_to->beamItem()->updateFileName(filename);
 
     // copying axis data
-    auto spec_from = static_cast<const SpecularInstrumentItem*>(from);
+    const auto spec_from = static_cast<const SpecularInstrumentItem*>(from);
     auto axis_origin = getPointwiseAxisItem(spec_from);
     const QString current_axis_type = spec_from->beamItem()->inclinationAxisGroup()->currentType();
     if (current_axis_type == PointwiseAxisItem::M_TYPE)
diff --git a/GUI/View/SampleDesigner/SampleEditorCommands.cpp b/GUI/View/SampleDesigner/SampleEditorCommands.cpp
index 5e5d12aa780..c2cdac4d739 100644
--- a/GUI/View/SampleDesigner/SampleEditorCommands.cpp
+++ b/GUI/View/SampleDesigner/SampleEditorCommands.cpp
@@ -82,7 +82,7 @@ bool CommandChangeValue::mergeWith(const QUndoCommand* command)
     if (command->id() != id()) // make sure other is also an AppendText command
         return false;
 
-    auto other = static_cast<const CommandChangeValue*>(command);
+    const auto other = static_cast<const CommandChangeValue*>(command);
 
     if (m_path != other->m_path)
         return false;
-- 
GitLab