MCPcopy Create free account
hub / github.com/BIMCoderLiang/LNLib / ELgethash

Method ELgethash

src/LNLib/Algorithm/Voronoi.cpp:259–274  ·  view source on GitHub ↗

Get entry from hash table, pruning any deleted nodes */

Source from the content-addressed store, hash-verified

257
258/* Get entry from hash table, pruning any deleted nodes */
259struct LNLib::Halfedge* LNLib::VoronoiDiagramGenerator::ELgethash(int b)
260{
261 struct Halfedge* he;
262
263 if (b < 0 || b >= ELhashsize)
264 return((struct Halfedge*)NULL);
265 he = ELhash[b];
266 if (he == (struct Halfedge*)NULL || he->ELedge != (struct Edge*)DELETED)
267 return (he);
268
269 /* Hash table points to deleted half edge. Patch as necessary. */
270 ELhash[b] = (struct Halfedge*)NULL;
271 if ((he->ELrefcnt -= 1) == 0)
272 makefree((Freenode*)he, &hfl);
273 return ((struct Halfedge*)NULL);
274}
275
276struct LNLib::Halfedge* LNLib::VoronoiDiagramGenerator::ELleftbnd(struct PointVDG* p)
277{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected