Skip to content

Commit f32cbb9

Browse files
committed
Fixed unused parameters
1 parent 811d863 commit f32cbb9

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

Framework/Algorithms/src/MostLikelyMean.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ void MostLikelyMean::init() {
5656
void MostLikelyMean::exec() {
5757
const std::vector<double> input = getProperty("InputArray");
5858
const auto size = static_cast<int>(input.size());
59+
#if defined(_WIN32)
60+
// disable warning about multi_array
61+
#pragma warning(disable : 4996)
62+
#endif
5963
boost::multi_array<double, 2> cov(boost::extents[size][size]);
6064
PARALLEL_FOR_NO_WSP_CHECK()
6165
for (int i = 0; i < size; ++i) {

Framework/Geometry/inc/MantidGeometry/Crystal/MatrixVectorPairParser.h

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include "MantidGeometry/Crystal/MatrixVectorPair.h"
1010
#include "MantidGeometry/Crystal/V3R.h"
11+
#include "MantidKernel/Exception.h"
1112

1213
#include <boost/parser/parser.hpp>
1314

@@ -175,9 +176,9 @@ template <typename T> MatrixVectorPair<T, V3R> parseMatrixVectorPair(const std::
175176

176177
auto negativeSignAction = [&builder](auto const &) { builder.setCurrentSignNegative(); };
177178

178-
auto currentFactorAction = [&builder](auto &ctx) { builder.setCurrentFactor(_attr(ctx)); };
179+
auto currentFactorAction = [&builder](auto const &ctx) { builder.setCurrentFactor(_attr(ctx)); };
179180

180-
auto currentDirectionAction = [&builder](auto &ctx) { builder.setCurrentDirection(_attr(ctx)); };
181+
auto currentDirectionAction = [&builder](auto const &ctx) { builder.setCurrentDirection(_attr(ctx)); };
181182

182183
auto addCurrentStateToResultAction = [&builder](auto const &) { builder.addCurrentStateToResult(); };
183184

@@ -208,22 +209,16 @@ template <typename T> MatrixVectorPair<T, V3R> parseMatrixVectorPair(const std::
208209
auto m_parser = (m_componentSeries >> lit(',')[advanceRowAction] >> m_componentSeries >> lit(',')[advanceRowAction] >>
209210
m_componentSeries);
210211

211-
auto success = parse(matrixVectorString, m_parser);
212+
try {
213+
auto success = parse(matrixVectorString, m_parser, bp::ws);
212214

213-
if (!success) {
214-
throw std::runtime_error("Parse error");
215+
if (!success) {
216+
throw std::runtime_error("Parse error in '" + matrixVectorString + "'.");
217+
}
218+
} catch (std::runtime_error &builderError) {
219+
throw Kernel::Exception::ParseError("Parse error: " + std::string(builderError.what()), matrixVectorString, 0);
215220
}
216221

217-
// try {
218-
// qi::phrase_parse(strIterator, strEnd, parser, qi::space);
219-
220-
// if (std::distance(strIterator, strEnd) > 0) {
221-
// throw std::runtime_error("Additional characters at end of string: '" + std::string(strIterator, strEnd) + "'.");
222-
// }
223-
//} catch (std::runtime_error &builderError) {
224-
// throw Kernel::Exception::ParseError("Parse error: " + std::string(builderError.what()), matrixVectorString, 0);
225-
//}
226-
227222
return builder.getMatrixVectorPair<T>();
228223
}
229224

conda/recipes/conda_build_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ python:
2121
- 3.11
2222

2323
libboost_devel:
24-
- 1.86 # Aim to follow conda-forge
24+
- 1.88 # Aim to follow conda-forge
2525

2626
libboost_python_devel:
27-
- 1.86 # Aim to follow conda-forge
27+
- 1.88 # Aim to follow conda-forge
2828

2929
cmake:
3030
- '>=3.21.0,<4'

0 commit comments

Comments
 (0)