From 0d1c76975ccceea62525b537e8e78e48a95c421d Mon Sep 17 00:00:00 2001 From: Samuel Jones <samjones714@gmail.com> Date: Tue, 13 Aug 2019 08:28:28 +0100 Subject: [PATCH] Re #18826 Fix GCC Compiler warning "maybe-uninitialised" --- .../ISISReflectometry/GUI/Common/Decoder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Decoder.cpp b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Decoder.cpp index 3b4b541b48a..166dbf5dd65 100644 --- a/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Decoder.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/GUI/Common/Decoder.cpp @@ -282,7 +282,7 @@ Decoder::decodeRow(const QMap<QString, QVariant> &map) { for (const auto &runNumber : map[QString("runNumbers")].toList()) { number.emplace_back(runNumber.toString().toStdString()); } - boost::optional<double> scaleFactor = boost::none; + boost::optional<double> scaleFactor{boost::none}; if (map[QString("scaleFactorPresent")].toBool()) { scaleFactor = map[QString("scaleFactor")].toDouble(); } @@ -297,9 +297,9 @@ Decoder::decodeRow(const QMap<QString, QVariant> &map) { } RangeInQ Decoder::decodeRangeInQ(const QMap<QString, QVariant> &map) { - boost::optional<double> min = boost::none; - boost::optional<double> step = boost::none; - boost::optional<double> max = boost::none; + boost::optional<double> min{boost::none}; + boost::optional<double> step{boost::none}; + boost::optional<double> max{boost::none}; if (map[QString("minPresent")].toBool()) { min = map[QString("min")].toDouble(); } -- GitLab