Skip to content

Commit e931657

Browse files
committed
- Return constant iterators from vector begin and end
- Pass extension as list
1 parent 91f289e commit e931657

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectReplaceFitResult.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ def validateInputs(self):
127127
input_workspace = self.getProperty("InputWorkspace").value
128128
single_fit_workspace = self.getProperty("SingleFitWorkspace").value
129129

130-
if not string_ends_with(input_name, self._allowed_ws_extension):
130+
if not string_ends_with(input_name, [self._allowed_ws_extension]):
131131
issues["InputWorkspace"] = "The input workspace must have a name ending in {0}".format(self._allowed_ws_extension)
132132

133-
if not string_ends_with(single_fit_name, self._allowed_ws_extension):
133+
if not string_ends_with(single_fit_name, [self._allowed_ws_extension]):
134134
issues["SingleFitWorkspace"] = "This workspace must have a name ending in {0}".format(self._allowed_ws_extension)
135135

136136
if not output_name:

qt/scientific_interfaces/Inelastic/QENSFitting/FitOutputOptionsModel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ template <typename Predicate> void removeVectorElements(std::vector<std::string>
134134
}
135135

136136
bool doesStringEndWith(std::string const &str, std::vector<std::string> const &delimiters) {
137-
return std::any_of(delimiters.begin(), delimiters.end(),
137+
return std::any_of(delimiters.cbegin(), delimiters.cend(),
138138
[&str](std::string const &delimiter) { return str.ends_with(delimiter); });
139139
}
140140

0 commit comments

Comments
 (0)