Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ql/experimental/termstructures/crosscurrencyratehelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ namespace QuantLib {
const DayCounter& dayCount,
Integer paymentLag) {

Period freqPeriod = Period(paymentFrequency);
auto freqPeriod = Period(paymentFrequency);

Schedule sch = legSchedule(evaluationDate, tenor, freqPeriod, fixingDays, calendar,
convention, endOfMonth);
Expand Down Expand Up @@ -277,7 +277,7 @@ namespace QuantLib {
bool isBasisOnFxBaseCurrencyLeg,
Frequency paymentFrequency,
Integer paymentLag)
: CrossCurrencySwapRateHelperBase(basis, tenor, fixingDays, calendar, convention, endOfMonth,
: CrossCurrencySwapRateHelperBase(basis, tenor, fixingDays, std::move(calendar), convention, endOfMonth,
std::move(collateralCurve), paymentLag),
baseCcyIdx_(std::move(baseCurrencyIndex)), quoteCcyIdx_(std::move(quoteCurrencyIndex)),
isFxBaseCurrencyCollateralCurrency_(isFxBaseCurrencyCollateralCurrency),
Expand Down Expand Up @@ -432,15 +432,15 @@ namespace QuantLib {
BusinessDayConvention convention,
bool endOfMonth,
Frequency fixedFrequency,
const DayCounter& fixedDayCount,
DayCounter fixedDayCount,
const ext::shared_ptr<IborIndex>& floatIndex,
const Handle<YieldTermStructure>& collateralCurve,
bool collateralOnFixedLeg,
Integer paymentLag)
: CrossCurrencySwapRateHelperBase(fixedRate, tenor, fixingDays, calendar, convention, endOfMonth,
std::move(collateralCurve), paymentLag),
collateralCurve, paymentLag),
fixedFrequency_(fixedFrequency),
fixedDayCount_(fixedDayCount),
fixedDayCount_(std::move(fixedDayCount)),
floatIndex_(floatIndex),
collateralOnFixedLeg_(collateralOnFixedLeg) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ namespace QuantLib {
BusinessDayConvention convention,
bool endOfMonth,
Frequency fixedFrequency,
const DayCounter& fixedDayCount,
DayCounter fixedDayCount,
const ext::shared_ptr<IborIndex>& floatIndex,
const Handle<YieldTermStructure>& collateralCurve,
bool collateralOnFixedLeg,
Expand Down
6 changes: 4 additions & 2 deletions test-suite/crosscurrencyratehelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,8 @@ BOOST_AUTO_TEST_CASE(testConstNotionalHelperCollateralOnFixedLeg) {
};

std::vector<ext::shared_ptr<RateHelper> > helpers;
for (auto [tenor, q]: quotes) {
helpers.reserve(quotes.size());
for (auto [tenor, q]: quotes) {
helpers.push_back(ext::make_shared<ConstNotionalCrossCurrencySwapRateHelper>(
makeQuoteHandle(q), tenor, fixingDays, cal, bdc, endOfMonth,
fixedFreq, fixedDC, euribor3m,
Expand Down Expand Up @@ -682,7 +683,8 @@ BOOST_AUTO_TEST_CASE(testConstNotionalHelperCollateralOnFloatingLeg) {
};

std::vector<ext::shared_ptr<RateHelper> > helpers;
for (auto [tenor, q]: quotes) {
helpers.reserve(quotes.size());
for (auto [tenor, q]: quotes) {
helpers.push_back(ext::make_shared<ConstNotionalCrossCurrencySwapRateHelper>(
makeQuoteHandle(q), tenor, fixingDays, cal, bdc, endOfMonth,
fixedFreq, fixedDC, euribor3m,
Expand Down
Loading