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

Comparing ray/src/common/octree.c (file contents):
Revision 1.1 by greg, Thu Feb 2 10:34:37 1989 UTC vs.
Revision 1.2 by greg, Sat Oct 14 10:56:32 1989 UTC

# Line 15 | Line 15 | static char SCCSid[] = "$SunId$ LBL";
15   #include  "octree.h"
16  
17   OCTREE  *octblock[MAXOBLK];             /* our octree */
18 < static OCTREE  ofreelist = EMPTY;       /* free octree nodes */
18 > static OCTREE  ofreelist = EMPTY;       /* freed octree nodes */
19   static OCTREE  treetop = 0;             /* next free node */
20  
21  
# Line 69 | Line 69 | register OCTREE  ot;
69          for (i = 1; i < 8; i++)
70                  if ((octkid(ot, i) = combine(octkid(ot, i))) != ores)
71                          ores = ot;
72 <        if (!istree(ores))      /* all were identical leaves */
73 <                octfree(ot);
72 >        if (!istree(ores)) {    /* all were identical leaves */
73 >                octkid(ot, 0) = ofreelist;
74 >                ofreelist = ot;
75 >        }
76          return(ores);
77   }
78  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines