mirror of https://github.com/tstellar/bygfoot.git
Make team_get_fixture() return const pointer
This commit is contained in:
parent
bc506ef7c4
commit
863fefd371
|
@ -748,7 +748,7 @@ player_is_banned(const Player *pl)
|
||||||
printf("player_is_banned\n");
|
printf("player_is_banned\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Fixture *fix = team_get_fixture(pl->team, FALSE);
|
const Fixture *fix = team_get_fixture(pl->team, FALSE);
|
||||||
gint yellow_red = -1, yellow, red;
|
gint yellow_red = -1, yellow, red;
|
||||||
|
|
||||||
if(fix == NULL)
|
if(fix == NULL)
|
||||||
|
|
|
@ -255,7 +255,7 @@ team_of_id(gint id)
|
||||||
/** Return a pointer to the next or last fixture the team participates in.
|
/** Return a pointer to the next or last fixture the team participates in.
|
||||||
@param tm The team we examine.
|
@param tm The team we examine.
|
||||||
@return The pointer to the fixture or NULL if none is found. */
|
@return The pointer to the fixture or NULL if none is found. */
|
||||||
Fixture*
|
const Fixture*
|
||||||
team_get_fixture(const Team *tm, gboolean last_fixture)
|
team_get_fixture(const Team *tm, gboolean last_fixture)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -263,7 +263,7 @@ team_get_fixture(const Team *tm, gboolean last_fixture)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gint i, j;
|
gint i, j;
|
||||||
Fixture *fix = NULL;
|
const Fixture *fix = NULL;
|
||||||
|
|
||||||
if(!last_fixture &&
|
if(!last_fixture &&
|
||||||
(stat0 == STATUS_LIVE_GAME_PAUSE ||
|
(stat0 == STATUS_LIVE_GAME_PAUSE ||
|
||||||
|
|
|
@ -64,7 +64,7 @@ team_get_pointers_from_array(const GArray *teams, GPtrArray *team_ptrs);
|
||||||
Team*
|
Team*
|
||||||
team_of_id(gint id);
|
team_of_id(gint id);
|
||||||
|
|
||||||
Fixture*
|
const Fixture*
|
||||||
team_get_fixture(const Team *tm, gboolean last_fixture);
|
team_get_fixture(const Team *tm, gboolean last_fixture);
|
||||||
|
|
||||||
gfloat
|
gfloat
|
||||||
|
|
|
@ -1284,7 +1284,7 @@ treeview_helper_player_cards_to_cell(gchar *buf, const Player *pl)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gint yellow;
|
gint yellow;
|
||||||
Fixture *fix =
|
const Fixture *fix =
|
||||||
team_get_fixture(pl->team, FALSE);
|
team_get_fixture(pl->team, FALSE);
|
||||||
|
|
||||||
if(fix == NULL)
|
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");
|
printf("treeview_helper_player_games_goals_to_cell\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Fixture *fix = team_get_fixture(pl->team, FALSE);
|
const Fixture *fix = team_get_fixture(pl->team, FALSE);
|
||||||
gint clid = pl->team->clid;
|
gint clid = pl->team->clid;
|
||||||
|
|
||||||
if(pl->games_goals->len == 0)
|
if(pl->games_goals->len == 0)
|
||||||
|
|
Loading…
Reference in New Issue