Skip to content

Commit 3be0174

Browse files
author
Damien Barker
committed
QPR-12959 use alternative constructor
1 parent 15cc26d commit 3be0174

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

OREData/ored/scripting/utilities.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ QuantLib::ext::shared_ptr<FallbackIborIndex> IndexInfo::irIborFallback(const Qua
504504
auto on = QuantLib::ext::dynamic_pointer_cast<OvernightIndex>(parseIborIndex(data.rfrIndex));
505505
QL_REQUIRE(on, "IndexInfo::irIborFallback(): could not cast rfr index '"
506506
<< data.rfrIndex << "' for ibor fallback index '" << name_ << "' to an overnight index");
507-
return QuantLib::ext::make_shared<FallbackIborIndex>(irIbor_, on, data.spread, data.switchDate, true);
507+
return QuantLib::ext::make_shared<FallbackIborIndex>(irIbor_, on, data.spread, data.switchDate, irIbor_->forwardingTermStructure());
508508
}
509509
return nullptr;
510510
}
@@ -519,7 +519,8 @@ IndexInfo::irOvernightFallback(const QuantLib::ext::shared_ptr<IborFallbackConfi
519519
QL_REQUIRE(on, "IndexInfo::irIborFallback(): could not cast rfr index '"
520520
<< data.rfrIndex << "' for ibor fallback index '" << name_ << "' to an overnight index");
521521
if (auto original = QuantLib::ext::dynamic_pointer_cast<OvernightIndex>(irIbor_))
522-
return QuantLib::ext::make_shared<FallbackIborIndex>(original, on, data.spread, data.switchDate, true);
522+
return QuantLib::ext::make_shared<FallbackIborIndex>(original, on, data.spread, data.switchDate,
523+
original->forwardingTermStructure());
523524
else
524525
return nullptr;
525526
}

0 commit comments

Comments
 (0)