Author: cazfi
Date: Tue Apr 26 15:01:02 2016
New Revision: 32500

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

See patch #7147

Modified:
    trunk/common/player.c
    trunk/common/player.h

Modified: trunk/common/player.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/player.c?rev=32500&r1=32499&r2=32500&view=diff
==============================================================================
--- trunk/common/player.c       (original)
+++ trunk/common/player.c       Tue Apr 26 15:01:02 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
@@ -1329,14 +1329,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: trunk/common/player.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/player.h?rev=32500&r1=32499&r2=32500&view=diff
==============================================================================
--- trunk/common/player.h       (original)
+++ trunk/common/player.h       Tue Apr 26 15:01:02 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
@@ -462,7 +462,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