ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/image.C
(Generate patch)

Comparing deliantra/server/common/image.C (file contents):
Revision 1.39 by root, Tue Jan 3 11:25:30 2012 UTC vs.
Revision 1.40 by root, Tue Jan 3 11:59:14 2012 UTC

29faceidx blank_face, empty_face, magicmouth_face; 29faceidx blank_face, empty_face, magicmouth_face;
30 30
31facehash_t facehash; 31facehash_t facehash;
32std::vector<faceinfo> faces; 32std::vector<faceinfo> faces;
33 33
34static std::vector<faceidx> faces_free; 34static std::vector<faceidx> faces_freelist;
35 35
36faceidx face_alloc () 36faceidx face_alloc ()
37{ 37{
38 faceidx idx; 38 faceidx idx;
39 39
40 if (faces_freelist.empty ()) 40 if (!faces_freelist.empty ())
41 { 41 {
42 idx = faces_free.back (); 42 idx = faces_freelist.back ();
43 faces_free.pop_back (); 43 faces_freelist.pop_back ();
44 } 44 }
45 else 45 else
46 { 46 {
47 idx = faces.size (); 47 idx = faces.size ();
48 48
53 } 53 }
54 54
55 return idx; 55 return idx;
56} 56}
57 57
58void
58faceinfo::unref () 59faceinfo::unref ()
59{ 60{
60 if (--refcnt) 61 if (--refcnt)
61 return; 62 return;
62 63

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines