Skip to content

Commit

Permalink
Remove unused argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jclarkeSTFC committed Apr 26, 2024
1 parent 7fce3d8 commit b66ebd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ namespace PolarizationCorrectionsHelpers {
MANTID_ALGORITHMS_DLL API::MatrixWorkspace_sptr workspaceForSpinState(API::WorkspaceGroup_sptr group,
const std::string &spinStateOrder,
const std::string &targetSpinState);
MANTID_ALGORITHMS_DLL size_t indexOfWorkspaceForSpinState(API::WorkspaceGroup_sptr group,
const std::string &spinStateOrder,
MANTID_ALGORITHMS_DLL size_t indexOfWorkspaceForSpinState(const std::string &spinStateOrder,
const std::string &targetSpinState);
MANTID_ALGORITHMS_DLL std::vector<std::string> splitSpinStateString(const std::string &spinStates);
} // namespace PolarizationCorrectionsHelpers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ state in the spin state order as the index of the workspace in the group.
*/
API::MatrixWorkspace_sptr workspaceForSpinState(API::WorkspaceGroup_sptr group, const std::string &spinStateOrder,
const std::string &targetSpinState) {
const auto wsIndex = indexOfWorkspaceForSpinState(group, spinStateOrder, targetSpinState);
const auto wsIndex = indexOfWorkspaceForSpinState(spinStateOrder, targetSpinState);
return std::dynamic_pointer_cast<API::MatrixWorkspace>(group->getItem(wsIndex));
}

/*
For a given workspace group, spin state order, and desired spin state, this method will
return the index of the specified workspace from the group, using the position of the desired spin
return the index of the specified workspace in the group, using the position of the desired spin
state in the spin state order.
*/
size_t indexOfWorkspaceForSpinState(API::WorkspaceGroup_sptr group, const std::string &spinStateOrder,
const std::string &targetSpinState) {
size_t indexOfWorkspaceForSpinState(const std::string &spinStateOrder, const std::string &targetSpinState) {
std::vector<std::string> spinStateVector = splitSpinStateString(spinStateOrder);
auto trimmedTargetSpinState = targetSpinState;
boost::trim(trimmedTargetSpinState);
Expand Down

0 comments on commit b66ebd9

Please sign in to comment.