POV-Ray : Newsgroups : povray.programming : objects.h - Copy_Flag : Re: objects.h - Copy_Flag Server Time
28 Jul 2024 08:19:19 EDT (-0400)
  Re: objects.h - Copy_Flag  
From: Thorsten Froehlich
Date: 16 Sep 2002 07:51:40
Message: <3d85c5cc@news.povray.org>
In article <3d81cb77@news.povray.org> , "Massimo Valentini" 
<six### [at] inwindit> wrote:

> Again, looking in the code I spotted this MACRO that seems to me
> wrong:
>
> -> File: objects.h Line: 55-56
>  *   Copy_Flag   (Object1, Object2, Flag) : Set the Flag in Object1 to the
>  *                                          value of the Flag in Object2.
>
> -> File: objects.h Line: 108-111
> #define Copy_Flag(Object1, Object2, Flag) \
>   { (Object1)->Flags = (((Object1)->Flags) & (!Flag)) | \
>                        (((Object2)->Flags) &  (Flag)); }
>
> I think ~ is correct instead of !

I agree.  However, s it is only used in Copy_Poly (the function that copies
declared poly objects), I guess nobody noticed yet in years...

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.