@@ -88,7 +88,7 @@ struct Book final:PineStrategyHost{
8888 auto & lots (){return pyramid_entries_;}const auto & lots ()const {return pyramid_entries_;}
8989 const auto & rows ()const {return trades_;}const auto & actions ()const {return stream_order_actions_;}
9090 double ledger (const char * id)const {auto at=id_unclosed_qty_.find (id);return at==id_unclosed_qty_.end ()?0 :at->second ;}
91- void retain_exit (){PendingOrder o;o.id =" retained" ;o.from_entry =" old" ;o.type =OrderType::EXIT ;o.incarnation =999 ;o.created_seq =999 ;pending_orders_.push_back (std::move (o));}
91+ void retain_exit (){PendingOrder o{} ;o.id =" retained" ;o.from_entry =" old" ;o.type =OrderType::EXIT ;o.incarnation =999 ;o.created_seq =999 ;pending_orders_.push_back (std::move (o));}
9292 size_t pending ()const {return pending_orders_.size ();}const PendingOrder* pending_data ()const {return pending_orders_.data ();}
9393};
9494
@@ -112,7 +112,7 @@ void refused_provenance(bool zero,bool scratch){
112112 b.open (3 ,100 ,33 ," untouched" );
113113 if (scratch)b.lots ()[0 ].market_pyramid_add =true ;
114114 const auto hash=b.broker_state_hash ();const auto action_count=b.actions ().size ();bool threw=false ;
115- try {if (scratch){PendingOrder o;o.from_entry =" A" ;o.legs .set_stop_price (99 );(void )b.scratch (o,110 );}
115+ try {if (scratch){PendingOrder o{} ;o.from_entry =" A" ;o.legs .set_stop_price (99 );(void )b.scratch (o,110 );}
116116 else b.by_all (110 ," A" );}catch (const std::runtime_error& e){threw=true ;CHECK (std::string (e.what ()).size ()>0 );}
117117 CHECK (threw);CHECK (b.broker_state_hash ()==hash&&b.rows ().empty ()&&b.actions ().size ()==action_count);
118118 near (b.qty (),5 );
@@ -184,7 +184,7 @@ void frozen_quantity_provenance(double sign){
184184
185185void raw_cycles_and_noeffect (double sign){
186186 scenario=" RAW one cycle allocator and after-Applied stamps" ;Book b;
187- PendingOrder o;o.type =OrderType::RAW_ORDER ;o.id =" raw" ;o.is_long =sign>0 ;o.qty =1.25 ;o.incarnation =11 ;
187+ PendingOrder o{} ;o.type =OrderType::RAW_ORDER ;o.id =" raw" ;o.is_long =sign>0 ;o.qty =1.25 ;o.incarnation =11 ;
188188 o.created_position_side =PositionSide::FLAT ;b.raw (o,100 );
189189 REQUIRE (b.lots ().size ()==1 );CHECK (b.cycle ()==1 &&b.next_cycle ()==2 );CHECK (b.ledger (" raw" )==1.25 );
190190 PendingOrder add=o;add.id =" raw-add" ;add.incarnation =22 ;add.created_position_side =sign>0 ?PositionSide::LONG :PositionSide::SHORT ;
@@ -203,15 +203,15 @@ void source_slots_and_scratch(){
203203 b.partial (110 ,1 ,cause);CHECK (b.lots ().size ()==1 );CHECK (b.slots ()==(cause==Bracket?7 :1 ));}
204204 scenario=" R20 release remains after bracket slot restoration" ;Book unique;unique.pyramid (2 );
205205 unique.bar (0 ,100 );unique.open (1 ,100 ,11 ," A" );unique.bar (1 ,100 );unique.open (1 ,100 ,22 ," B" );unique.bar (3 ,110 );
206- PendingOrder o;o.type =OrderType::EXIT ;o.id =" X" ;o.from_entry =" A" ;o.qty =1 ;o.qty_percent =50 ;o.incarnation =99 ;o.created_seq =99 ;
206+ PendingOrder o{} ;o.type =OrderType::EXIT ;o.id =" X" ;o.from_entry =" A" ;o.qty =1 ;o.qty_percent =50 ;o.incarnation =99 ;o.created_seq =99 ;
207207 o.created_bar =2 ;o.created_position_side =PositionSide::LONG ;o.created_position_cycle_seq =unique.cycle ();
208208 o.quantity_request .request (QuantityIntent::units (1 ));o.quantity_request .reserve (1 ,2 );o.legs .set_limit_price (110 );
209209 unique.exit (o,110 );REQUIRE (unique.lots ().size ()==1 );CHECK (unique.lots ()[0 ].entry_incarnation ==22 &&unique.slots ()==1 );
210210 scenario=" KI62 second one-ticket fill after primary bracket" ;Book scratch;
211211 scratch.bar (1 ,100 );scratch.open (1 ,100 ,55 ," A" );scratch.bar (3 ,110 );
212212 scratch.open (1 ,100 ,11 ," A" );scratch.open (2 ,100 ,11 ," A" );scratch.open (4 ,100 ,22 ," Other" );
213213 scratch.lots ()[1 ].market_pyramid_add =true ;scratch.lots ()[2 ].market_pyramid_add =true ;scratch.slots (5 );
214- PendingOrder bracket;bracket.type =OrderType::EXIT ;bracket.id =" scratch-bracket" ;bracket.from_entry =" A" ;
214+ PendingOrder bracket{} ;bracket.type =OrderType::EXIT ;bracket.id =" scratch-bracket" ;bracket.from_entry =" A" ;
215215 bracket.qty =1 ;bracket.qty_percent =12.5 ;bracket.incarnation =100 ;bracket.created_seq =100 ;
216216 bracket.quantity_request .request (QuantityIntent::units (1 ));bracket.quantity_request .reserve (1 ,8 );
217217 bracket.legs .set_limit_price (110 );
0 commit comments