Author: cazfi Date: Tue Apr 26 15:01:11 2016 New Revision: 32502 URL: http://svn.gna.org/viewcvs/freeciv?rev=32502&view=rev Log: Inlined is_barbarian()
See patch #7147 Modified: branches/S2_5/common/player.c branches/S2_5/common/player.h Modified: branches/S2_5/common/player.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/player.c?rev=32502&r1=32501&r2=32502&view=diff ============================================================================== --- branches/S2_5/common/player.c (original) +++ branches/S2_5/common/player.c Tue Apr 26 15:01:11 2016 @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1336,14 +1336,6 @@ } /************************************************************************** - Return TRUE iff player is any kind of barbarian -**************************************************************************/ -bool is_barbarian(const struct player *pplayer) -{ - return pplayer->ai_common.barbarian_type != NOT_A_BARBARIAN; -} - -/************************************************************************** Return TRUE iff the player me gives shared vision to player them. **************************************************************************/ bool gives_shared_vision(const struct player *me, const struct player *them) Modified: branches/S2_5/common/player.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/player.h?rev=32502&r1=32501&r2=32502&view=diff ============================================================================== --- branches/S2_5/common/player.h (original) +++ branches/S2_5/common/player.h Tue Apr 26 15:01:11 2016 @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -393,7 +393,13 @@ int player_in_territory(const struct player *pplayer, const struct player *pplayer2); -bool is_barbarian(const struct player *pplayer); +/************************************************************************** + Return TRUE iff player is any kind of barbarian +**************************************************************************/ +static inline bool is_barbarian(const struct player *pplayer) +{ + return pplayer->ai_common.barbarian_type != NOT_A_BARBARIAN; +} bool gives_shared_vision(const struct player *me, const struct player *them); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits