Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
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
083d45cd
Commit
083d45cd
authored
5 months ago
by
adriazalvarez
Browse files
Options
Downloads
Patches
Plain Diff
Fix auto causes copy warning
parent
186a3a94
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
qt/scientific_interfaces/Inelastic/QENSFitting/FunctionQParameters.cpp
+4
-2
4 additions, 2 deletions
..._interfaces/Inelastic/QENSFitting/FunctionQParameters.cpp
with
4 additions
and
2 deletions
qt/scientific_interfaces/Inelastic/QENSFitting/FunctionQParameters.cpp
+
4
−
2
View file @
083d45cd
...
...
@@ -15,6 +15,8 @@ using namespace Mantid::API;
namespace
{
typedef
std
::
pair
<
std
::
string
,
std
::
size_t
>
pairNameSpectra
;
std
::
vector
<
std
::
pair
<
std
::
string
,
std
::
size_t
>>
findAxisLabels
(
TextAxis
const
*
axis
,
std
::
vector
<
std
::
string
>
const
&
parameterSuffixes
)
{
std
::
vector
<
std
::
pair
<
std
::
string
,
std
::
size_t
>>
labelAndSpectra
;
...
...
@@ -56,7 +58,7 @@ FunctionQParameters::FunctionQParameters(const MatrixWorkspace_sptr &workspace)
m_a0s
(
findAxisLabels
(
workspace
,
{
".A0"
}))
{}
std
::
vector
<
std
::
string
>
FunctionQParameters
::
names
(
std
::
string
const
&
parameterType
)
const
{
auto
const
nameGetter
=
[](
auto
const
&
pair
)
{
return
pair
.
first
;
};
auto
const
nameGetter
=
[](
pairNameSpectra
const
&
pair
)
{
return
pair
.
first
;
};
if
(
parameterType
==
"Width"
)
{
return
extract
<
std
::
string
>
(
m_widths
,
nameGetter
);
}
else
if
(
parameterType
==
"EISF"
)
{
...
...
@@ -68,7 +70,7 @@ std::vector<std::string> FunctionQParameters::names(std::string const ¶meter
}
std
::
vector
<
std
::
size_t
>
FunctionQParameters
::
spectra
(
std
::
string
const
&
parameterType
)
const
{
auto
const
spectraGetter
=
[](
auto
const
&
pair
)
{
return
pair
.
second
;
};
auto
const
spectraGetter
=
[](
pairNameSpectra
const
&
pair
)
{
return
pair
.
second
;
};
if
(
parameterType
==
"Width"
)
{
return
extract
<
std
::
size_t
>
(
m_widths
,
spectraGetter
);
}
else
if
(
parameterType
==
"EISF"
)
{
...
...
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