|
14 | 14 | #include "TMethod.h"
|
15 | 15 | #include "TF1.h"
|
16 | 16 | #include "TMethodCall.h"
|
17 |
| -#include <TBenchmark.h> |
18 | 17 | #include "TError.h"
|
19 | 18 | #include "TInterpreter.h"
|
20 | 19 | #include "TInterpreterValue.h"
|
@@ -804,9 +803,9 @@ prepareMethod(bool HasParameters, bool HasVariables, const char* FuncName,
|
804 | 803 | TString prototypeArguments = "";
|
805 | 804 | if (HasVariables || HasParameters) {
|
806 | 805 | if (IsVectorized)
|
807 |
| - prototypeArguments.Append("ROOT::Double_v*"); |
| 806 | + prototypeArguments.Append("ROOT::Double_v const*"); |
808 | 807 | else
|
809 |
| - prototypeArguments.Append("Double_t*"); |
| 808 | + prototypeArguments.Append("Double_t const*"); |
810 | 809 | }
|
811 | 810 | auto AddDoublePtrParam = [&prototypeArguments]() {
|
812 | 811 | prototypeArguments.Append(",");
|
@@ -2387,7 +2386,7 @@ void TFormula::ProcessFormula(TString &formula)
|
2387 | 2386 | TString argType = fVectorized ? "ROOT::Double_v" : "Double_t";
|
2388 | 2387 |
|
2389 | 2388 | // valid input formula - try to put into Cling (in case of no variables but only parameter we need to add the standard signature)
|
2390 |
| - TString argumentsPrototype = TString::Format("%s%s%s", ( (hasVariables || hasParameters) ? (argType + " *x").Data() : ""), |
| 2389 | + TString argumentsPrototype = TString::Format("%s%s%s", ( (hasVariables || hasParameters) ? (argType + " const *x").Data() : ""), |
2391 | 2390 | (hasParameters ? "," : ""), (hasParameters ? "Double_t *p" : ""));
|
2392 | 2391 |
|
2393 | 2392 | // set the name for Cling using the hash_function
|
@@ -3680,7 +3679,7 @@ TString TFormula::GetExpFormula(Option_t *option, const char *fl_format) const
|
3680 | 3679 |
|
3681 | 3680 | TString TFormula::GetGradientFormula() const {
|
3682 | 3681 | std::unique_ptr<TInterpreterValue> v = gInterpreter->MakeInterpreterValue();
|
3683 |
| - std::string s("(void (&)(Double_t *, Double_t *, Double_t *)) "); |
| 3682 | + std::string s("(void (&)(Double_t const *, Double_t *, Double_t *)) "); |
3684 | 3683 | s += GetGradientFuncName();
|
3685 | 3684 | gInterpreter->Evaluate(s.c_str(), *v);
|
3686 | 3685 | return v->ToString();
|
|
0 commit comments