forked from github/server
incomplete new get_regions_distance implementation
This commit is contained in:
parent
c606a9ac4d
commit
b0905f8e6e
1 changed files with 23 additions and 0 deletions
|
@ -1112,6 +1112,29 @@ void reports_done(void) {
|
|||
}
|
||||
}
|
||||
|
||||
static int get_regions_distance_arr(region *r, int radius,
|
||||
region *result[], int size)
|
||||
{
|
||||
int n = 0, i;
|
||||
|
||||
if (size>n) {
|
||||
result[n++] = r;
|
||||
}
|
||||
for (i = 0; i != n; ++i) {
|
||||
region *adj[MAXDIRECTIONS];
|
||||
int d;
|
||||
|
||||
r = result[i];
|
||||
get_neighbours(r, adj);
|
||||
for (d = 0; d != MAXDIRECTIONS; ++d) {
|
||||
r = adj[d];
|
||||
if (size>n) {
|
||||
result[n++] = r;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static quicklist *get_regions_distance(region * root, int radius)
|
||||
{
|
||||
quicklist *ql, *rlist = NULL;
|
||||
|
|
Loading…
Reference in a new issue