Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
4fc3631d
Commit
4fc3631d
authored
8 years ago
by
Martyn Gigg
Browse files
Options
Downloads
Patches
Plain Diff
Avoid warning with brace initializers on clang
Refs #17194
parent
afac407d
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Framework/DataHandling/src/SetSample.cpp
+3
-3
3 additions, 3 deletions
Framework/DataHandling/src/SetSample.cpp
Framework/DataHandling/test/SetSampleTest.h
+5
-4
5 additions, 4 deletions
Framework/DataHandling/test/SetSampleTest.h
with
8 additions
and
7 deletions
Framework/DataHandling/src/SetSample.cpp
+
3
−
3
View file @
4fc3631d
...
...
@@ -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"
;
...
...
This diff is collapsed.
Click to expand it.
Framework/DataHandling/test/SetSampleTest.h
+
5
−
4
View file @
4fc3631d
...
...
@@ -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
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment