#48214: ASSERT_UNUSED_ACTRES_CASES / ASSERT_UNUSED_ACTION_CASES Open Date: 2023-06-11 07:08 Last Update: 2023-06-11 07:16 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/48214 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48214 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2023-06-11 07:16 Updated by: cazfi * Owner Update from (None) to cazfi * Resolution Update from None to Accepted Comment: The attached patch likely applies no matter whether #48146 has been applied first or not, but it does not handle the switch that #48146 removes from actions.c. So this patch will need updating (completing) if #48146 gets rejected. --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: cazfi Type: Patches Status: Open [Owner assigned] Priority: 5 - Medium MileStone: 3.2.0 Component: General Severity: 5 - Medium Resolution: Accepted --------------------------------------------------------------------- Ticket details: Split from the patch I'm working on for #48135 Add macros ASSERT_UNUSED_ACTRES_CASES and ASSERT_UNUSED_ACTION_CASES for supporting unused entries within enumerations of actres and actions. We have many 'switch - case' -constructs that require all those values to be present as cases. Just include these new macros to such switch, and then on we can control such unused values by modifying those macros only, i.e., only in one place instead of large number of switches. -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/48214 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48214