Ticket #45735

upgrade_unit_order_targets(): Dead assignment of tgt_tile

Open Date: 2022-09-27 12:08 Last Update: 2022-10-08 11:06

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
1

Details

upgrade_unit_order_targets():

/* The target is already specified in the new format. */
tgt_tile = index_to_tile(&(wld.map), order->target);
fc_assert(tgt_tile != NULL);
return;

tgt_tile is not used in NDEBUG build, and entire index_to_tile() call (with no relevant side-effect) is unnecessary in such cases.

Ticket History (3/4 Histories)

2022-09-27 12:08 Updated by: cazfi
  • New Ticket "upgrade_unit_order_targets(): Dead assignment of tgt_tile" created
2022-10-01 19:17 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
2022-10-08 11:06 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

Please login to add comment to this ticket » Login