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 merge requests found
......@@ -29,7 +29,7 @@ getSampleSpeciesInfo(const API::MatrixWorkspace_const_sptr ws) {
const double xSection = ws->sample().getMaterial().totalScatterXSection();
const double bSqrdBar = xSection / (4.0 * M_PI);
for (auto element : formula) {
for (const auto element : formula) {
const std::map<std::string, double> atomMap{
{"mass", element.atom->mass},
{"stoich", element.multiplicity},
......@@ -37,7 +37,7 @@ getSampleSpeciesInfo(const API::MatrixWorkspace_const_sptr ws) {
atomSpecies[element.atom->symbol] = atomMap;
totalStoich += element.multiplicity;
}
for (auto atom : atomSpecies) {
for (const auto atom : atomSpecies) {
atom.second["concentration"] = atom.second["stoich"] / totalStoich;
}
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