From b4d813186e37dcc127fc981a94c70edaae0708f8 Mon Sep 17 00:00:00 2001 From: ZhilkinSerg Date: Thu, 19 Dec 2019 22:12:07 +0300 Subject: [PATCH] Fix astyle regression --- src/npctrade.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/npctrade.cpp b/src/npctrade.cpp index 257630747dc0a..f2f33c4bf76ca 100644 --- a/src/npctrade.cpp +++ b/src/npctrade.cpp @@ -74,7 +74,7 @@ void npc_trading::transfer_items( std::vector &stuff, player &give } } } else { - if( ip.charges > 0 ){ + if( ip.charges > 0 ) { ip.loc.get_item()->set_var( "trade_charges", charges ); } else { ip.loc.get_item()->set_var( "trade_amount", 1 ); @@ -616,21 +616,21 @@ bool npc_trading::trade( npc &np, int cost, const std::string &deal ) npc_trading::transfer_items( trade_win.theirs, np, g->u, from_map, true ); for( item_location *loc_ptr : from_map ) { - if( !loc_ptr ){ + if( !loc_ptr ) { continue; } item *it = loc_ptr->get_item(); - if( !it ){ + if( !it ) { continue; } - if( it->has_var( "trade_charges" ) && it->count_by_charges() ){ + if( it->has_var( "trade_charges" ) && it->count_by_charges() ) { it->charges -= static_cast( it->get_var( "trade_charges", 0 ) ); - if( it->charges <= 0 ){ + if( it->charges <= 0 ) { loc_ptr->remove_item(); } else { it->erase_var( "trade_charges" ); } - } else if( it->has_var( "trade_amount" ) ){ + } else if( it->has_var( "trade_amount" ) ) { loc_ptr->remove_item(); } }