Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2001:
[Freeciv-Dev] Re: map_adjust_x()
Home

[Freeciv-Dev] Re: map_adjust_x()

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gaute B Strokkenes <gs234@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: map_adjust_x()
From: Thue <thue@xxxxxxx>
Date: Mon, 19 Mar 2001 22:07:17 +0100

> Anyone who wishes to have a closer look at these results can get the
> following files from my web page: fast_map3.diff,
> civserver.cvs.pg.gprof.out, civserver.cvs.fast_map.gprof.out

Hmm; I am not that happy about the use of macros; it would be nicer with 
inline functions and then let the compiler make sure everything works just 
like a normal function call, as well as giving the compiler a better chance 
of optimizing. Normal function calls are also clearer to read...
Why not do something like this in the header file:

#ifdef INLINE_SUPPORTED
/* functions as inline */
#endif

and then this in the .c file:

#ifndef INLINE_SUPPORTED
/* functions as non-inline */
#endif

As mentioned before inline functions are in the C99 standard, so it is not 
that restrictive to only optimize for that. Besides, far most freeciv people 
use gcc for compiling.

-Thue *who would like to require C99 compliance for freeciv compilers*



[Prev in Thread] Current Thread [Next in Thread]