@@ -78,7 +78,7 @@ void IrsContract::ApplyCurve(const Curve& curve) noexcept {
7878
7979/* IrsBuilder */
8080
81- [[nodiscard]] IrsContract IrsBuilder::Build (const HolidayStorage& hs, const JurisdictionType& jur, DateRollingRule rule) {
81+ [[nodiscard]] IrsContract IrsBuilder::Build (const HolidayStorage& hs, JurisdictionType jur, DateRollingRule rule) {
8282
8383 CDR_CHECK (maturity_date_.has_value ()) << " must be defined" ;
8484 CDR_CHECK (settlement_date_.has_value ()) << " must be defined" ;
@@ -88,10 +88,9 @@ void IrsContract::ApplyCurve(const Curve& curve) noexcept {
8888 CDR_CHECK (paying_fix_.has_value ()) << " must be defined" ;
8989 CDR_CHECK (fixed_freq_.has_value ()) << " must be defined" ;
9090 CDR_CHECK (float_freq_.has_value ()) << " must be defined" ;
91- CDR_CHECK (!jur.empty ()) << " must be non-empty" ;
9291
9392 static constexpr u32 kRandomReservationConstant = 10 ;
94- IrsContract result (fixed_rate_.value (), paying_fix_.value ());
93+ IrsContract result (jur, fixed_rate_.value (), paying_fix_.value ());
9594
9695 std::vector<IrsPaymentPeriod> sched;
9796 sched.reserve (kRandomReservationConstant );
@@ -159,7 +158,6 @@ void IrsContract::ApplyCurve(const Curve& curve) noexcept {
159158 sched[last].chrono_next_idx_ = curr;
160159 }
161160
162- result.jurisdiction_ = jur;
163161 result.chrono_last_idx_ = last;
164162 result.notional_ = *notional_;
165163 result.payment_periods_ = std::move (sched);
@@ -184,7 +182,7 @@ void IrsBuilder::Reset() {
184182
185183/* IrsBuilderExperimental */
186184
187- [[nodiscard]] IrsContract IrsBuilderExperimental::Build (const HolidayStorage& hs, const JurisdictionType& jur, DateRollingRule rule) {
185+ [[nodiscard]] IrsContract IrsBuilderExperimental::Build (const HolidayStorage& hs, JurisdictionType jur, DateRollingRule rule) {
188186
189187 CDR_CHECK (trade_date_.has_value ()) << " must be defined" ;
190188 CDR_CHECK (start_shift_.has_value ()) << " must be defined" ;
@@ -197,12 +195,11 @@ void IrsBuilder::Reset() {
197195 CDR_CHECK (adjustment_.has_value ()) << " must be defined" ;
198196 CDR_CHECK (notional_.has_value ()) << " must be defined" ;
199197 CDR_CHECK (paying_fix_.has_value ()) << " must be defined" ;
200- CDR_CHECK (!jur.empty ()) << " must be non-empty" ;
201198
202199 CDR_CHECK (fixed_freq_->number > 0 ) << " must be positive" ;
203200 CDR_CHECK (float_freq_->number > 0 ) << " must be positive" ;
204201
205- IrsContract result (fixed_rate_.value_or (Percent::Zero ()), *paying_fix_);
202+ IrsContract result (jur, fixed_rate_.value_or (Percent::Zero ()), *paying_fix_);
206203 std::vector<IrsPaymentPeriod> sched;
207204
208205 // --------- fixed leg ------------
@@ -271,7 +268,6 @@ void IrsBuilder::Reset() {
271268
272269 // -------------------------------
273270
274- result.jurisdiction_ = jur;
275271 result.payment_periods_ = std::move (sched);
276272 result.fixed_leg_ = result.payment_periods_ .data ();
277273 result.float_leg_ = result.payment_periods_ .data () + float_begin;
0 commit comments