Skip to content

Commit 00c974d

Browse files
authored
fix coverity issue in findreflectomeryline (#38387)
1 parent bca6c73 commit 00c974d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Framework/Reflectometry/src/FindReflectometryLines2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void FindReflectometryLines2::exec() {
134134
setProperty(Prop::LINE_CENTRE, peakWSIndex);
135135
if (!isDefault(Prop::OUTPUT_WS)) {
136136
auto outputWS = makeOutput(peakWSIndex);
137-
setProperty(Prop::OUTPUT_WS, outputWS);
137+
setProperty(Prop::OUTPUT_WS, std::move(outputWS));
138138
}
139139
}
140140

@@ -189,7 +189,7 @@ double FindReflectometryLines2::findPeak(const API::MatrixWorkspace_sptr &ws) {
189189
func = API::FunctionFactory::Instance().createFunction("LinearBackground");
190190
func->setParameter("A0", medianY);
191191
func->setParameter("A1", 0.);
192-
sum->addFunction(func);
192+
sum->addFunction(std::move(func));
193193
// call Fit child algorithm
194194
auto fit = createChildAlgorithm("Fit");
195195
fit->initialize();

0 commit comments

Comments
 (0)