Skip to content

Commit

Permalink
Rewrite condition to satisfy static analysis
Browse files Browse the repository at this point in the history
cur_npc is null exactly when stationed_npcs is empty.  Writing it this
way makes clang-tidy happier.
  • Loading branch information
jbytheway committed Apr 15, 2020
1 parent 43805ae commit 4ba16c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/faction_camp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,7 @@ void basecamp::job_assignment_ui()
selection--;
}
} else if( action == "CONFIRM" ) {
if( !stationed_npcs.empty() ) {
if( cur_npc ) {
while( true ) {
uilist smenu;
smenu.text = _( "Assign job priority ( 0 to disable )" );
Expand Down

0 comments on commit 4ba16c9

Please sign in to comment.