Skip to content
Snippets Groups Projects
Unverified Commit 21bb06d0 authored by Harrietbrown's avatar Harrietbrown Committed by GitHub
Browse files

Apply suggestions from code review


Co-Authored-By: default avatarDan Nixon <dan@dan-nixon.com>
parent efc99c84
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ getSampleSpeciesInfo(const API::MatrixWorkspace_const_sptr ws) { ...@@ -29,7 +29,7 @@ getSampleSpeciesInfo(const API::MatrixWorkspace_const_sptr ws) {
const double xSection = ws->sample().getMaterial().totalScatterXSection(); const double xSection = ws->sample().getMaterial().totalScatterXSection();
const double bSqrdBar = xSection / (4.0 * M_PI); const double bSqrdBar = xSection / (4.0 * M_PI);
for (auto element : formula) { for (const auto element : formula) {
const std::map<std::string, double> atomMap{ const std::map<std::string, double> atomMap{
{"mass", element.atom->mass}, {"mass", element.atom->mass},
{"stoich", element.multiplicity}, {"stoich", element.multiplicity},
...@@ -37,7 +37,7 @@ getSampleSpeciesInfo(const API::MatrixWorkspace_const_sptr ws) { ...@@ -37,7 +37,7 @@ getSampleSpeciesInfo(const API::MatrixWorkspace_const_sptr ws) {
atomSpecies[element.atom->symbol] = atomMap; atomSpecies[element.atom->symbol] = atomMap;
totalStoich += element.multiplicity; totalStoich += element.multiplicity;
} }
for (auto atom : atomSpecies) { for (const auto atom : atomSpecies) {
atom.second["concentration"] = atom.second["stoich"] / totalStoich; atom.second["concentration"] = atom.second["stoich"] / totalStoich;
} }
return atomSpecies; return atomSpecies;
......
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