[wesnoth-commits] [wesnoth/wesnoth] b82516: Team: cleaned up some redundancy in color getters

GitHub noreply at github.com
Thu Apr 5 01:28:38 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: b82516ffe6f0b1b4255b1b1dd51bdbb6c090ae86
      https://github.com/wesnoth/wesnoth/commit/b82516ffe6f0b1b4255b1b1dd51bdbb6c090ae86
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2018-04-05 (Thu, 05 Apr 2018)

  Changed paths:
    M src/ai/formula/function_table.cpp
    M src/display_chat_manager.cpp
    M src/gui/dialogs/game_stats.cpp
    M src/menu_events.cpp
    M src/replay.cpp
    M src/team.cpp
    M src/team.hpp

  Log Message:
  -----------
  Team: cleaned up some redundancy in color getters

* The one case of get_side_color_range().mid() was converted to get_side_color();
  These are equivalent
* get_side_rgb() was removed. Before color_range was refactored to use color_t
  (f2ab245e8d3f782911bcd6e83b0d34514331db42), the only difference between it and
  get_side_color() was that the former used to return uint32_t (the color they returned
  was the same.
* get_side_rgb_min() and get_side_rgb_max() were renamed to get_side_color_min() and
  get_side_color_max(), respectively. Both were unused in any case.
* get_side_highlight_pango() was renamed get_side_color_pango() and now takes a 1-indexed
  side like the other color functions instead of taking 0-indexed and adding 1.




More information about the Commits mailing list