Skip to content

Commit f129f06

Browse files
restore previous yy inflation index clone method
1 parent 70e50da commit f129f06

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

ql/indexes/inflationindex.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,13 +509,21 @@ namespace QuantLib {
509509

510510
ext::shared_ptr<YoYInflationIndex> YoYInflationIndex::clone(
511511
const Handle<YoYInflationTermStructure>& h) const {
512+
/*
512513
if (ratio_) {
513514
return ext::make_shared<YoYInflationIndex>(underlyingIndex_, interpolated_, h);
514515
} else {
515516
return ext::make_shared<YoYInflationIndex>(familyName_, region_, revised_,
516517
interpolated_, frequency_,
517518
availabilityLag_, currency_, h);
518519
}
520+
*/
521+
return ext::make_shared<YoYInflationIndex>(
522+
familyName_, region_, revised_,
523+
interpolated_, ratio_, frequency_,
524+
availabilityLag_, currency_, h);
525+
526+
519527
}
520528

521529

0 commit comments

Comments
 (0)