Author: Bo Persson
Date: 16:12:02 01/18/01
Go up one level in this thread
On January 18, 2001 at 18:22:21, David Rasmussen wrote:
>Is there any reason _not_ to use inline functions instead of small utility
>macros?
>
>For instance, would there be any difference between
>
>#define File(sq) (sq & 7)
>
>and
>
>inline int File(int sq)
>{
> return (sq & 7);
>}
>
>besides the type checking and other nice things that might be gained?
>
>Would there be any downside to the inline function?
No. :-)
The only difference is that it is no longer C, but C++. This used to be a
problem if you wanted the code to be extremely portable, like Crafty. Nowadays I
don't know any system with a good C compiler and a lousy (performance wise)
C++ compiler.
Bo Persson
bop@malmo.mail.telia.com
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.