PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ query_accumulate()

static void query_accumulate ( void *  item,
void *  userdata 
)
static

Definition at line 136 of file lwgeom_geos_cluster.c.

References QueryContext::items_found, QueryContext::items_found_size, lwalloc(), lwrealloc(), and QueryContext::num_items_found.

Referenced by dbscan_update_context(), and union_intersecting_pairs().

137 {
138  struct QueryContext *cxt = userdata;
139  if (!cxt->items_found)
140  {
141  cxt->items_found_size = 8;
142  cxt->items_found = lwalloc(cxt->items_found_size * sizeof(void*));
143  }
144 
145  if (cxt->num_items_found >= cxt->items_found_size)
146  {
147  cxt->items_found_size = 2 * cxt->items_found_size;
148  cxt->items_found = lwrealloc(cxt->items_found, cxt->items_found_size * sizeof(void*));
149  }
150  cxt->items_found[cxt->num_items_found++] = item;
151 }
uint32_t num_items_found
uint32_t items_found_size
void * lwrealloc(void *mem, size_t size)
Definition: lwutil.c:237
void * lwalloc(size_t size)
Definition: lwutil.c:229
Here is the call graph for this function:
Here is the caller graph for this function: