Re: act() different 'const' qualifiers?

From: Daniel A. Koepke (
Date: 04/11/02

On Thu, 11 Apr 2002, David Cole wrote:

> CHECK_NULL(vict_obj, PERS((struct char_data *) vict_obj, to)); // 1428

ACTNULL is const, but you've removed the constness from i, thus you're
possibly attempting to assign a const to a non-const.  I don't
particularly like the idea of unnecessarily removing the constness from
everything, but since you've already done it, you may as well remove the
const qualifier from ACTNULL.

> char *PERS(struct char_data *ch, struct char_data *vict)
> {
>   static char buf1[80];

Be careful with a small buffer like this...

>       send_to_char(red_shape_name[GET_SIZE(ch)], ch);
>       send_to_char("\r\n", ch);
>       return(buf1);

I doubt this is what you wanted to do, here.

> This is all I have changed, minus #define CAN_SEE(sub, obj) (CanSee(sub),
> (obj))

You want

    #define CAN_SEE(sub, obj) (CanSee((sub), (obj)))

I'm not entirely clear on why you didn't just kill the #define and name
your new function CAN_SEE to begin with.


   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT