Author: cazfi
Date: Tue Apr 26 15:01:07 2016
New Revision: 32501

URL: http://svn.gna.org/viewcvs/freeciv?rev=32501&view=rev
Log:
Inlined is_barbarian()

See patch #7147

Modified:
    branches/S2_6/common/player.c
    branches/S2_6/common/player.h

Modified: branches/S2_6/common/player.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/player.c?rev=32501&r1=32500&r2=32501&view=diff
==============================================================================
--- branches/S2_6/common/player.c       (original)
+++ branches/S2_6/common/player.c       Tue Apr 26 15:01:07 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
@@ -1326,14 +1326,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_6/common/player.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/player.h?rev=32501&r1=32500&r2=32501&view=diff
==============================================================================
--- branches/S2_6/common/player.h       (original)
+++ branches/S2_6/common/player.h       Tue Apr 26 15:01:07 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
@@ -442,7 +442,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

Reply via email to