[Commits] [wesnoth/wesnoth] d587ad: Team: formatting cleanup

GitHub noreply at github.com
Wed Oct 25 22:28:05 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: d587ad36ec0c985da98a813365b8b3061e94e764
      https://github.com/wesnoth/wesnoth/commit/d587ad36ec0c985da98a813365b8b3061e94e764
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-10-26 (Thu, 26 Oct 2017)

  Changed paths:
    M src/team.cpp

  Log Message:
  -----------
  Team: formatting cleanup


  Commit: f8784338477283f632f780860ec341165f133012
      https://github.com/wesnoth/wesnoth/commit/f8784338477283f632f780860ec341165f133012
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-10-26 (Thu, 26 Oct 2017)

  Changed paths:
    M src/team.cpp

  Log Message:
  -----------
  Team: range-for


  Commit: 02de08338c0f31b79f1a6604fe7470ee77471323
      https://github.com/wesnoth/wesnoth/commit/02de08338c0f31b79f1a6604fe7470ee77471323
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-10-26 (Thu, 26 Oct 2017)

  Changed paths:
    M RELEASE_NOTES
    M changelog
    M src/filesystem_boost.cpp

  Log Message:
  -----------
  Revert "Disallow specifying file paths with backslashes"

This reverts commit 1b9c07eb402f2031ce8a85cec912c0246f426eb5.

I'm reverting this (at least temporarily) since it seems mainline contains *numerous* paths with
backslashes. This change basically spams console with warnings just from mainline/core content,
in addition to having other negative side effects such as leader image generation failing when
populating a save_index file. Plus, if backslashes really broke things on Linux, I think we'd have
had a multitude of people complaining about half their images not showing up on that platform, which
(AFAIK) has not been the case.


  Commit: ff5d68f9f5794140adc46e7a16dd6e90ca1723e2
      https://github.com/wesnoth/wesnoth/commit/ff5d68f9f5794140adc46e7a16dd6e90ca1723e2
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-10-26 (Thu, 26 Oct 2017)

  Changed paths:
    M src/editor/action/mouse/mouse_action_item.cpp
    M src/editor/action/mouse/mouse_action_unit.cpp
    M src/editor/palette/unit_palette.cpp
    M src/gui/widgets/unit_preview_pane.cpp
    M src/reports.cpp
    M src/save_index.cpp
    M src/team.cpp
    M src/team.hpp
    M src/units/drawer.cpp
    M src/units/unit.cpp
    M src/whiteboard/manager.cpp
    M src/whiteboard/move.cpp

  Log Message:
  -----------
  Some refactoring of team color data handling

These changes cover areas from PR #2101, excluding the removal of the numeric ID color ranges.
That can't be done yet (it breaks things).

This also excludes any changes to the connect_engine color handling. That needs to be refactored
separately. Despite the fact that it's done very similar to the new get_side_color_id function,
I need to deal with the fact that every side_engine member in the connect engine keeps a copy of
the default color options.

* Added a general-purpose function to extract color data from a config.
* Refactored the team class's general get-side's-color-data function so it always returns a color
  ID instead of falling back on a number.
* Deployed this change for the leader image coloring in the save_index; said coloring is now always
  done by ID.
* Save color data by ID in team_info instead of using the side number if no color was provided.
* Renamed get_side_color_index to get_side_color_id to better reflect its purpose.


Compare: https://github.com/wesnoth/wesnoth/compare/8bfc5eb1da8f...ff5d68f9f579


More information about the Commits mailing list