kill_unit() calls player_slot_count() many times. The value returned will be the same every time, so should just call it once, and store the value in a variable. This should also help with some clang analyzer warnings that alerted me to this issue - compiler cannot know that each of those calls return the same value.
kill_unit() calls player_slot_count() many times. The value returned will be the same every time, so should just call it once, and store the value in a variable. This should also help with some clang analyzer warnings that alerted me to this issue - compiler cannot know that each of those calls return the same value.