Skip to content

Commit 5350c9e

Browse files
pcaspersjenkins
authored andcommitted
QPR-12275 replace method returning reference by set method
1 parent fe2af2a commit 5350c9e

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

OREData/ored/portfolio/trade.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ void Trade::validate() const {
119119
}
120120
}
121121

122+
void Trade::setEnvelope(const Envelope& envelope) {
123+
envelope_ = envelope;
124+
}
125+
122126
void Trade::reset() {
123127
// save accumulated timings from wrapper to trade before resetting
124128
if (instrument_ != nullptr) {

OREData/ored/portfolio/trade.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class Trade : public XMLSerializable {
118118
string& id() { return id_; }
119119

120120
//! Set the envelope with counterparty and portfolio info
121-
Envelope& envelope() { return envelope_; }
121+
void setEnvelope(const Envelope& envelope);
122122

123123
//! Set the trade actions
124124
TradeActions& tradeActions() { return tradeActions_; }

0 commit comments

Comments
 (0)