[wesnoth-commits] [wesnoth/wesnoth] aa5aec: addon/mg: Refactor installed/available_addons()

Iris Morelle noreply at github.com
Thu Dec 10 08:14:57 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: aa5aec091486e7d17f30a35900d075e189b73b1f
      https://github.com/wesnoth/wesnoth/commit/aa5aec091486e7d17f30a35900d075e189b73b1f
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2020-12-10 (Thu, 10 Dec 2020)

  Changed paths:
    M src/addon/manager.cpp

  Log Message:
  -----------
  addon/mg: Refactor installed/available_addons()

The code in both is almost identical except for the check for .pbl
files. Furthermore, the call to filesystem::get_files_in_dir() does not
need a list of files to output since support for Addon_Name.cfg-style
add-ons was dropped in version 1.13.0.

The ADDON_ENUM_CRITERIA enumeration is there in case in the future we
need more criteria for enumerating add-ons. Right now it's just a
convenience so enumerate_addons_internal() takes a self-descriptive
parameter instead of a boolean.





More information about the Commits mailing list