Skip to content

Commit 150ada5

Browse files
authored
[RF] Qualify calls to std::move in RooPolyFunc (root-project#11163)
Soon-to-be-released Clang 15 will complain: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
1 parent 23b361c commit 150ada5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

roofit/roofitcore/src/RooPolyFunc.cxx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ part of the RooFit computation graph.
3131
#include "RooMsgService.h"
3232
#include "RooRealVar.h"
3333

34+
#include <utility>
35+
3436
using namespace std;
3537
using namespace RooFit;
3638

@@ -56,7 +58,7 @@ void RooPolyFunc::addTerm(double coefficient)
5658

5759
termList->addOwned(*exponents);
5860
termList->addOwned(*coeff);
59-
_terms.push_back(move(termList));
61+
_terms.push_back(std::move(termList));
6062
}
6163

6264
void RooPolyFunc::addTerm(double coefficient, const RooAbsReal &var1, int exp1)
@@ -80,7 +82,7 @@ void RooPolyFunc::addTerm(double coefficient, const RooAbsReal &var1, int exp1)
8082

8183
termList->addOwned(*exponents);
8284
termList->addOwned(*coeff);
83-
_terms.push_back(move(termList));
85+
_terms.push_back(std::move(termList));
8486
}
8587

8688
void RooPolyFunc::addTerm(double coefficient, const RooAbsReal &var1, int exp1, const RooAbsReal &var2, int exp2)
@@ -105,7 +107,7 @@ void RooPolyFunc::addTerm(double coefficient, const RooAbsReal &var1, int exp1,
105107
}
106108
termList->addOwned(*exponents);
107109
termList->addOwned(*coeff);
108-
_terms.push_back(move(termList));
110+
_terms.push_back(std::move(termList));
109111
}
110112

111113
void RooPolyFunc::addTerm(double coefficient, const RooAbsCollection &exponents)
@@ -122,7 +124,7 @@ void RooPolyFunc::addTerm(double coefficient, const RooAbsCollection &exponents)
122124
auto coeff = new RooRealVar(coeff_name.c_str(), coeff_name.c_str(), coefficient);
123125
termList->addOwned(exponents);
124126
termList->addOwned(*coeff);
125-
_terms.push_back(move(termList));
127+
_terms.push_back(std::move(termList));
126128
}
127129

128130
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)