ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rhdisp2.c
(Generate patch)

Comparing ray/src/hd/rhdisp2.c (file contents):
Revision 3.5 by gregl, Fri Nov 21 18:17:37 1997 UTC vs.
Revision 3.6 by gregl, Mon Nov 24 15:17:28 1997 UTC

# Line 373 | Line 373 | VIEW   *vold, *vnew;
373                  ocnt = -ocnt;
374          if ((nca.rev = ncnt < 0))
375                  ncnt = -ncnt;
376 <                                /* add and delete cells in order */
377 <        while (ocnt > 0 & ncnt > 0)
378 <                if ((c = cellcmp(ogcp, ngcp)) > 0) {    /* new cell */
379 <                        netchange += docell(ngcp++, &nca);
380 <                        ncnt--;
381 <                } else if (c < 0) {                     /* obsolete cell */
382 <                        netchange -= docell(ogcp++, &oca);
383 <                        ocnt--;
384 <                } else {                                /* same cell? */
385 <                        if (oca.rev != nca.rev)         /* not */
386 <                                netchange += docell(ngcp, &nca) -
387 <                                                docell(ogcp, &oca);
388 <                        ogcp++; ocnt--;
389 <                        ngcp++; ncnt--;
390 <                }
376 >        if (nca.rev == oca.rev)         /* add and delete cells in order */
377 >                while (ocnt > 0 & ncnt > 0)
378 >                        if ((c = cellcmp(ogcp, ngcp)) > 0) {    /* new cell */
379 >                                netchange += docell(ngcp++, &nca);
380 >                                ncnt--;
381 >                        } else if (c < 0) {                     /* old cell */
382 >                                netchange -= docell(ogcp++, &oca);
383 >                                ocnt--;
384 >                        } else {                                /* same cell */
385 >                                ogcp++; ocnt--;
386 >                                ngcp++; ncnt--;
387 >                        }
388                                  /* take care of list tails */
389          for ( ; ncnt > 0; ncnt--)
390                  netchange += docell(ngcp++, &nca);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines