Bug #1457
openredundant Action methods
0%
Description
api_find_action_by_name() and api_find_action() are unused duplicates of api_find_action_type_by_name() and api_find_action_type_by_id(). Actually, the first pair is older introduced in https://github.com/freeciv/freeciv/commit/0afafc7e5761d24e918e9e22934654cdb4d9d719 while the second somehow appeared in S3_1 with https://github.com/freeciv/freeciv/commit/f3a41d753ab5c8d9ef9d4b168395d933e7a184cd
Files
Updated by Marko Lindqvist 2 months ago
- Target version changed from 3.1.6 to 3.3.0-d3f
Updated by Marko Lindqvist 7 days ago
Both pairs are used in the tolua_game.pkg as if overloading functions. Since their fingerprints are identical, user cannot really select one over another (nor even to really see that there's two copies). Not sure which pair lua ends using, though the comments hint that it uses first one (as listed) methods that matches, i.e., the api_find_action_by_name() / api_find_action(). But that doesn't really matter. We can still remove either, and the remaining pair will provide functionality identical to old one even if the removed pair was in use.
Updated by Marko Lindqvist 7 days ago
- File 0045-Lua-Remove-duplicate-action-finder-methods.patch 0045-Lua-Remove-duplicate-action-finder-methods.patch added
- File 0027-Lua-Remove-duplicate-action-finder-methods.patch 0027-Lua-Remove-duplicate-action-finder-methods.patch added
- Status changed from New to In Review
- Assignee set to Marko Lindqvist