Skip to content

Commit b9ab0bf

Browse files
pcaspersjenkins
authored andcommitted
Merge branch 'QPR-13355' into 'master'
QPR-13355 fix crossccyswap constructor Closes QPR-13355 See merge request qs/oreplus!2741
1 parent 72aae3b commit b9ab0bf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

QuantExt/qle/instruments/crossccyswap.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@ namespace QuantExt {
2222

2323
CrossCcySwap::CrossCcySwap(const Leg& firstLeg, const Currency& firstLegCcy, const Leg& secondLeg,
2424
const Currency& secondLegCcy)
25-
: Swap(firstLeg, secondLeg) {
25+
: Swap(firstLeg, secondLeg), inCcyLegNPV_(2, 0.0), inCcyLegBPS_(2, 0.0), npvDateDiscounts_(2, 0.0) {
2626
currencies_.resize(2);
2727
currencies_[0] = firstLegCcy;
2828
currencies_[1] = secondLegCcy;
2929
}
3030

3131
CrossCcySwap::CrossCcySwap(const std::vector<Leg>& legs, const std::vector<bool>& payer,
3232
const std::vector<Currency>& currencies)
33-
: Swap(legs, payer), currencies_(currencies) {
33+
: Swap(legs, payer), currencies_(currencies), inCcyLegNPV_(legs.size(), 0.0), inCcyLegBPS_(legs.size(), 0.0),
34+
npvDateDiscounts_(legs.size(), 0.0) {
3435
QL_REQUIRE(payer.size() == currencies_.size(), "Size mismatch "
3536
"between payer ("
3637
<< payer.size() << ") and currencies (" << currencies_.size()

0 commit comments

Comments
 (0)