Re: Hopefully last addition to clan code

From: JTRhone (ujtr@lady.cs.sunyit.edu)
Date: 01/23/97


> 
> This could be written like:
> 
>   struct char_data *is_player(char *vict_name) {
>     struct descriptor_data *i = descriptor_list;
>     while (i)
>       if (!i->connected && i->character &&
>           !str_cmp(GET->NAME(i->character), vict_name))
>         break;
>     return (i);
>   }        ^^^
> 
> Just a random thought...
> 
I wouldn't break, i'd just return (i->character); if found..
and if i make it out of the loop, i'd return (NULL);

just another random thought

jtrhone aka vall RoA

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



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