Ticket #46563

Replace action_target_compl_calc() switch with a table

Open Date: 2023-01-21 15:00 Last Update: 2023-01-27 08:04

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

Details

- Add struct actres
- Make array of them to hold information about every actres
- Make act_tgt_compl the first field of the strcuct actres
- Replace large switch in action_target_compl_calc() with indexed lookup from the actres array
- This is natural opportunity to start splitting new actres.[ch] module from actions.[ch] -> have the array and the new implementation of action_target_compl_calc() in the new module

Ticket History (3/6 Histories)

2023-01-21 15:00 Updated by: cazfi
  • New Ticket "Replace action_target_compl_calc() switch with a table" created
2023-01-21 15:06 Updated by: cazfi
  • Owner Update from (None) to cazfi
  • Resolution Update from None to Accepted
2023-01-23 11:47 Updated by: cazfi
Comment

- New version of the patch: Replaced the Great Danes with "The Freeciv Team" in the copyright notice of new files.

2023-01-27 08:04 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