Author: cazfi Date: Sun Sep 6 00:25:29 2015 New Revision: 29785 URL: http://svn.gna.org/viewcvs/freeciv?rev=29785&view=rev Log: Turned extra_base_get() & extra_road_get() to macros.
See patch #6304 Modified: trunk/common/extras.c trunk/common/extras.h Modified: trunk/common/extras.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/extras.c?rev=29785&r1=29784&r2=29785&view=diff ============================================================================== --- trunk/common/extras.c (original) +++ trunk/common/extras.c Sun Sep 6 00:25:29 2015 @@ -224,22 +224,6 @@ } /************************************************************************** - Returns base type of extra. -**************************************************************************/ -struct base_type *extra_base_get(const struct extra_type *pextra) -{ - return pextra->data.base; -} - -/************************************************************************** - Returns road type of extra. -**************************************************************************/ -struct road_type *extra_road_get(const struct extra_type *pextra) -{ - return pextra->data.road; -} - -/************************************************************************** Returns extra type for given cause. **************************************************************************/ struct extra_type_list *extra_type_list_by_cause(enum extra_cause cause) Modified: trunk/common/extras.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/common/extras.h?rev=29785&r1=29784&r2=29785&view=diff ============================================================================== --- trunk/common/extras.h (original) +++ trunk/common/extras.h Sun Sep 6 00:25:29 2015 @@ -149,8 +149,8 @@ struct extra_type *extra_type_by_rule_name(const char *name); struct extra_type *extra_type_by_translated_name(const char *name); -struct base_type *extra_base_get(const struct extra_type *pextra); -struct road_type *extra_road_get(const struct extra_type *pextra); +#define extra_base_get(_e_) (_e_)->data.base +#define extra_road_get(_e_) (_e_)->data.road void extra_to_caused_by_list(struct extra_type *pextra, enum extra_cause cause); struct extra_type_list *extra_type_list_by_cause(enum extra_cause cause); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits