Author: cazfi
Date: Wed Apr 27 21:56:52 2016
New Revision: 32509

URL: http://svn.gna.org/viewcvs/freeciv?rev=32509&view=rev
Log:
Moved special_extra_get() to savecompat.c

See patch #7152

Modified:
    trunk/common/extras.c
    trunk/common/extras.h
    trunk/server/savecompat.c
    trunk/server/savecompat.h

Modified: trunk/common/extras.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/extras.c?rev=32509&r1=32508&r2=32509&view=diff
==============================================================================
--- trunk/common/extras.c       (original)
+++ trunk/common/extras.c       Wed Apr 27 21:56:52 2016
@@ -170,20 +170,6 @@
   return &extras[id];
 }
 
-/****************************************************************************
-  Get extra of the given special
-****************************************************************************/
-struct extra_type *special_extra_get(int spe)
-{
-  struct extra_type_list *elist = extra_type_list_by_cause(EC_SPECIAL);
-
-  if (spe < extra_type_list_size(elist)) {
-    return extra_type_list_get(elist, spe);
-  }
-
-  return NULL;
-}
-
 /**************************************************************************
   Return the (translated) name of the extra type.
   You don't have to free the return pointer.

Modified: trunk/common/extras.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/extras.h?rev=32509&r1=32508&r2=32509&view=diff
==============================================================================
--- trunk/common/extras.h       (original)
+++ trunk/common/extras.h       Wed Apr 27 21:56:52 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
@@ -154,11 +154,9 @@
 struct extra_type *extra_by_number(int id);
 
 /* For optimization purposes (being able to have it as macro instead of 
function
- * call) this is now same as extra_number(). extras.c does have sematically 
correct
+ * call) this is now same as extra_number(). extras.c does have semantically 
correct
  * implementation too. */
 #define extra_index(_e_) (_e_)->id
-
-struct extra_type *special_extra_get(int spe);
 
 const char *extra_name_translation(const struct extra_type *pextra);
 const char *extra_rule_name(const struct extra_type *pextra);

Modified: trunk/server/savecompat.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savecompat.c?rev=32509&r1=32508&r2=32509&view=diff
==============================================================================
--- trunk/server/savecompat.c   (original)
+++ trunk/server/savecompat.c   Wed Apr 27 21:56:52 2016
@@ -233,6 +233,20 @@
   fc_assert(type >= 0 && type < S_LAST);
 
   return special_names[type];
+}
+
+/****************************************************************************
+  Get extra of the given special
+****************************************************************************/
+struct extra_type *special_extra_get(int spe)
+{
+  struct extra_type_list *elist = extra_type_list_by_cause(EC_SPECIAL);
+
+  if (spe < extra_type_list_size(elist)) {
+    return extra_type_list_get(elist, spe);
+  }
+
+  return NULL;
 }
 
 /* =======================================================================

Modified: trunk/server/savecompat.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savecompat.h?rev=32509&r1=32508&r2=32509&view=diff
==============================================================================
--- trunk/server/savecompat.h   (original)
+++ trunk/server/savecompat.h   Wed Apr 27 21:56:52 2016
@@ -165,6 +165,7 @@
 
 enum tile_special_type special_by_rule_name(const char *name);
 const char *special_rule_name(enum tile_special_type type);
+struct extra_type *special_extra_get(int spe);
 
 enum ai_level ai_level_convert(int old_level);
 enum barbarian_type barb_type_convert(int old_type);


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to