[wesnoth-commits] [wesnoth/wesnoth] 387388: Make forced --wconsole logic easier to read and ex...

Iris Morelle noreply at github.com
Tue Jun 16 05:25:42 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 3873887936858ffc3c930a22fb25701aabfcd4be
      https://github.com/wesnoth/wesnoth/commit/3873887936858ffc3c930a22fb25701aabfcd4be
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2020-06-16 (Tue, 16 Jun 2020)

  Changed paths:
    M src/wesnoth.cpp

  Log Message:
  -----------
  Make forced --wconsole logic easier to read and extend

Instead of a massive wall of chained ORs, have two lists with qualifying
switches, one for those that don't take arguments and another for those
that do so. The latter are expected to have the argument past the '='
character (substituting the unwieldy hardcoded compare() method calls
with substr() comparisons) or in a subsequent command line argument that
we can ignore at this point.

Also added --validate-addon, -h and -v to the list of applicable
switches.

There's a lambda expression that needs to be redone on every loop but
who cares, this is only the command line argument scan phase anyway.





More information about the Commits mailing list