improvements from clang-tidy

This commit is contained in:
Axel Kohlmeyer
2023-12-19 23:37:07 -05:00
parent 3237c30117
commit dedbd8f6db
16 changed files with 33 additions and 46 deletions

View File

@ -129,9 +129,9 @@ TEST(LeptonCustomFunction, zbl)
*/
class ExampleFunction : public Lepton::CustomFunction {
int getNumArguments() const { return 2; }
double evaluate(const double *arguments) const { return 2.0 * arguments[0] * arguments[1]; }
double evaluateDerivative(const double *arguments, const int *derivOrder) const
int getNumArguments() const override { return 2; }
double evaluate(const double *arguments) const override { return 2.0 * arguments[0] * arguments[1]; }
double evaluateDerivative(const double *arguments, const int *derivOrder) const override
{
if (derivOrder[0] == 1) {
if (derivOrder[1] == 0)
@ -142,7 +142,7 @@ class ExampleFunction : public Lepton::CustomFunction {
if (derivOrder[1] == 1 && derivOrder[0] == 0) return 2.0 * arguments[0];
return 0.0;
}
Lepton::CustomFunction *clone() const { return new ExampleFunction(); }
Lepton::CustomFunction *clone() const override { return new ExampleFunction(); }
};
/**