Skip to content

Commit

Permalink
pointer simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
OzoneH3 committed Dec 18, 2018
1 parent 87e37d2 commit 84c375c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9043,7 +9043,7 @@ bool game::plfire()
if( gun->has_flag( "RELOAD_AND_SHOOT" ) ) {
if( !gun->ammo_remaining() ) {
item::reload_option opt = u.ammo_location &&
gun->can_reload_with( ( *u.ammo_location ).typeId() ) ? item::reload_option( &u, args.relevant,
gun->can_reload_with( u.ammo_location->typeId() ) ? item::reload_option( &u, args.relevant,
args.relevant, u.ammo_location.clone() ) : u.select_ammo( *gun );
if( !opt ) {
// Menu canceled
Expand Down
2 changes: 1 addition & 1 deletion src/sidebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ static std::string print_gun_mode( const player &p )
auto m = p.weapon.gun_current_mode();
if( m ) {
if( m.melee() || !m->is_gunmod() ) {
if( p.ammo_location && p.weapon.can_reload_with( ( *p.ammo_location ).typeId() ) ) {
if( p.ammo_location && p.weapon.can_reload_with( p.ammo_location->typeId() ) ) {
return string_format( "%s (%d)", p.weapname().c_str(),
( *p.ammo_location ).charges );
}
Expand Down

0 comments on commit 84c375c

Please sign in to comment.