Skip to content
Snippets Groups Projects
Commit 4fc3631d authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Avoid warning with brace initializers on clang

Refs #17194
parent afac407d
No related merge requests found
......@@ -191,9 +191,9 @@ std::map<std::string, std::string> SetSample::validateInputs() {
if (geomArgs) {
if (existsAndNotEmptyString(*geomArgs, GeometryArgs::SHAPE)) {
const std::array<const std::string *, 6> positiveValues = {
&ShapeArgs::HEIGHT, &ShapeArgs::WIDTH,
&ShapeArgs::THICK, &ShapeArgs::RADIUS,
&ShapeArgs::INNER_RADIUS, &ShapeArgs::OUTER_RADIUS};
{&ShapeArgs::HEIGHT, &ShapeArgs::WIDTH, &ShapeArgs::THICK,
&ShapeArgs::RADIUS, &ShapeArgs::INNER_RADIUS,
&ShapeArgs::OUTER_RADIUS}};
for (const auto &arg : positiveValues) {
if (existsAndNegative(*geomArgs, *arg)) {
errors[PropertyNames::GEOMETRY] = *arg + " argument < 0.0";
......
......@@ -347,7 +347,8 @@ public:
auto args = boost::make_shared<PropertyManager>();
args->declareProperty(
Mantid::Kernel::make_unique<StringProperty>("Shape", "FlatPlate"), "");
std::array<const std::string, 3> dimensions = {"Width", "Height", "Thick"};
std::array<const std::string, 3> dimensions = {
{"Width", "Height", "Thick"}};
const std::string geometryProp("Geometry");
for (const auto &dim : dimensions) {
args->declareProperty(
......@@ -367,7 +368,7 @@ public:
auto args = boost::make_shared<PropertyManager>();
args->declareProperty(
Mantid::Kernel::make_unique<StringProperty>("Shape", "Cylinder"), "");
std::array<const std::string, 2> dimensions = {"Radius", "Height"};
std::array<const std::string, 2> dimensions = {{"Radius", "Height"}};
const std::string geometryProp("Geometry");
for (const auto &dim : dimensions) {
args->declareProperty(
......@@ -388,8 +389,8 @@ public:
auto args = boost::make_shared<PropertyManager>();
args->declareProperty(
Mantid::Kernel::make_unique<StringProperty>("Shape", "FlatPlate"), "");
std::array<const std::string, 3> dimensions = {"InnerRadius", "OuterRadius",
"Height"};
std::array<const std::string, 3> dimensions = {
{"InnerRadius", "OuterRadius", "Height"}};
const std::string geometryProp("Geometry");
for (const auto &dim : dimensions) {
args->declareProperty(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment