Skip to content

Commit

Permalink
Cleanup if statement in player_activity::can_resume_with
Browse files Browse the repository at this point in the history
  • Loading branch information
rsulli55 committed May 5, 2020
1 parent ba115ae commit ab3921e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/player_activity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ bool player_activity::can_resume_with( const player_activity &other, const Chara
return false;
}

if( actor && other.actor && id() == other.id() ) {
// if actor XOR other.actor then id() != other.id() so
// we will correctly return false based on final return statement
if( actor && other.actor ) {
return actor->can_resume_with( *other.actor, who );
}

Expand Down

0 comments on commit ab3921e

Please sign in to comment.