[wesnoth-commits] [wesnoth/wesnoth] 48bfa7: image: Drop get/set_team_colors() functions
Iris Morelle
noreply at github.com
Fri Dec 4 15:48:09 UTC 2020
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 48bfa7abb89d57d6467c20e5e7647dd1e5d7437a
https://github.com/wesnoth/wesnoth/commit/48bfa7abb89d57d6467c20e5e7647dd1e5d7437a
Author: Iris Morelle <shadowm at wesnoth.org>
Date: 2020-12-04 (Fri, 04 Dec 2020)
Changed paths:
M src/display.cpp
M src/picture.cpp
M src/picture.hpp
M src/tests/test_image_modifications.cpp
M src/wesnoth.cpp
Log Message:
-----------
image: Drop get/set_team_colors() functions
These are dead code. set_team_colors() is used in a couple of places as
well as a unit test, but get_team_colors() is never used and neither is
the actual variable behind both. The documentation alluded to it being
used by the ~TC() image path function, but in reality that uses the team
API instead (team::get_side_color_range()).
This does raise a concern however -- the unit test that did use
set_team_colors() used it with trivial and predictable input, so it
wasn't actually testing it. Not sure how we would go about properly
testing ~TC() -- the image path function tests don't currently test
any single image mod's output correctness.
More information about the Commits
mailing list