Make team_get_fixture() return const pointer

This commit is contained in:
Tom Stellard 2020-09-07 21:02:20 -07:00
parent bc506ef7c4
commit 863fefd371
4 changed files with 6 additions and 6 deletions

View File

@ -748,7 +748,7 @@ player_is_banned(const Player *pl)
printf("player_is_banned\n");
#endif
Fixture *fix = team_get_fixture(pl->team, FALSE);
const Fixture *fix = team_get_fixture(pl->team, FALSE);
gint yellow_red = -1, yellow, red;
if(fix == NULL)

View File

@ -255,7 +255,7 @@ team_of_id(gint id)
/** Return a pointer to the next or last fixture the team participates in.
@param tm The team we examine.
@return The pointer to the fixture or NULL if none is found. */
Fixture*
const Fixture*
team_get_fixture(const Team *tm, gboolean last_fixture)
{
#ifdef DEBUG
@ -263,7 +263,7 @@ team_get_fixture(const Team *tm, gboolean last_fixture)
#endif
gint i, j;
Fixture *fix = NULL;
const Fixture *fix = NULL;
if(!last_fixture &&
(stat0 == STATUS_LIVE_GAME_PAUSE ||

View File

@ -64,7 +64,7 @@ team_get_pointers_from_array(const GArray *teams, GPtrArray *team_ptrs);
Team*
team_of_id(gint id);
Fixture*
const Fixture*
team_get_fixture(const Team *tm, gboolean last_fixture);
gfloat

View File

@ -1284,7 +1284,7 @@ treeview_helper_player_cards_to_cell(gchar *buf, const Player *pl)
#endif
gint yellow;
Fixture *fix =
const Fixture *fix =
team_get_fixture(pl->team, FALSE);
if(fix == NULL)
@ -1429,7 +1429,7 @@ treeview_helper_player_games_goals_to_cell(gchar *buf, const Player *pl, gint ty
printf("treeview_helper_player_games_goals_to_cell\n");
#endif
Fixture *fix = team_get_fixture(pl->team, FALSE);
const Fixture *fix = team_get_fixture(pl->team, FALSE);
gint clid = pl->team->clid;
if(pl->games_goals->len == 0)