Skip to content

Commit

Permalink
Fix compilation thanks to gcc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Oct 14, 2023
1 parent 1c90625 commit 8544518
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/action/action_attack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ bool COrder_Attack::AutoSelectTarget(CUnit &unit)
if (this->offeredTarget->IsVisibleAsGoal(*unit.Player)
&& (!immobile || InAttackRange(unit, *this->offeredTarget))) {
newTarget = newTarget ? &BestTarget(unit, *this->offeredTarget, *newTarget)
: this->offeredTarget;
: static_cast<CUnit*>(this->offeredTarget);
}
this->offeredTarget.Reset();
}
Expand Down

0 comments on commit 8544518

Please sign in to comment.