Skip to content

Commit

Permalink
Remove unused parameter
Browse files Browse the repository at this point in the history
The constraint should be set to the underlying method instead.
  • Loading branch information
lballabio committed Aug 2, 2023
1 parent b217876 commit ae8fa66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions ql/termstructures/yield/nonlinearfittingmethods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,7 @@ namespace QuantLib {
SpreadFittingMethod::SpreadFittingMethod(const ext::shared_ptr<FittingMethod>& method,
Handle<YieldTermStructure> discountCurve,
const Real minCutoffTime,
const Real maxCutoffTime,
Constraint constraint)
const Real maxCutoffTime)
: FittedBondDiscountCurve::FittingMethod(
method != nullptr ? method->constrainAtZero() : true,
method != nullptr ? method->weights() : Array(),
Expand Down
3 changes: 1 addition & 2 deletions ql/termstructures/yield/nonlinearfittingmethods.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ namespace QuantLib {
SpreadFittingMethod(const ext::shared_ptr<FittingMethod>& method,
Handle<YieldTermStructure> discountCurve,
Real minCutoffTime = 0.0,
Real maxCutoffTime = QL_MAX_REAL,
Constraint constraint = NoConstraint{});
Real maxCutoffTime = QL_MAX_REAL);
std::unique_ptr<FittedBondDiscountCurve::FittingMethod> clone() const override;
protected:
void init() override;
Expand Down

0 comments on commit ae8fa66

Please sign in to comment.