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.20 by root, Wed Mar 14 00:04:58 2007 UTC vs.
Revision 1.22 by root, Wed Mar 14 20:33:10 2007 UTC

75} 75}
76 76
77faceidx 77faceidx
78face_find (const char *name, faceidx defidx) 78face_find (const char *name, faceidx defidx)
79{ 79{
80 if (!name)
81 return defidx;
82
80 facehash_t::iterator i = facehash.find (name); 83 facehash_t::iterator i = facehash.find (name);
81 84
82 return i == facehash.end () 85 return i == facehash.end ()
83 ? defidx : i->second; 86 ? defidx : i->second;
84} 87}
85 88
86faceinfo * 89faceinfo *
87face_info (faceidx idx) 90face_info (faceidx idx)
88{ 91{
92 assert (0 < (faceidx)-1); // faceidx must be unsigned
93
89 if (idx >= faces.size ()) 94 if (idx >= faces.size ())
90 return 0; 95 return 0;
91 96
92 return &faces [idx]; 97 return &faces [idx];
93} 98}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines