Re: Question about do_stat_character

From: John Evans (evansj@HI-LINE.NET)
Date: 11/07/97


On Fri, 7 Nov 1997, S. Mead wrote:

> I was RingTFC this evening and I found something confusing in
> do_stat_character.  I see that  it fetches the stats, like GET_AC(k) and
> GET_GOLD(k) but then when it comes to HITROLL and DAMROLL it uses:
> k->points.hitroll and k->points.damroll    Why isnt this
> GET_HITROLL(k)?  I see that GET_HITROLL is defined like:
> #define GET_HITROLL(ch)   ((ch)->points.hitroll)
> Which means the same as k->points.hitroll I think, so what is the
> advantage of not using GET_HITROLL(k) or is there no advantage?
>

Here's a shot in the dark, but I could be wrong: Using ch->points.hitroll
will compile faster than GET_HITROLL(ch) because the pre-processor
doesn't have to take the time to replace GET_HITROLL(ch) with
ch->points.hitroll.

As far as speed of execution of the MUD... Should make zero difference
since the compiler never sees that difference.


John Evans <evansj@hi-line.net>

May the source be with you.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST