mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-22 23:43:00 +02:00
Revert "poly2d/p2d_hsort.c (p2d_hier_free): make freeing of polygons optional"
This reverts commit d758359791
.
This commit is contained in:
parent
ae9ad0348c
commit
ebb7d028ea
@ -39,7 +39,7 @@ struct f2d *f2d_tri(const struct p2d *p)
|
||||
|
||||
t = p2d_hsort(p);
|
||||
recurse_area(t, &last);
|
||||
p2d_hier_free(t, 0);
|
||||
p2d_hier_free(t);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* p2d_area.c - Fill a set of nested polygons
|
||||
*
|
||||
* Written 2012, 2013 by Werner Almesberger
|
||||
* Copyright 2012, 2013 Werner Almesberger
|
||||
* Written 2012 by Werner Almesberger
|
||||
* Copyright 2012 Werner Almesberger
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -39,6 +39,6 @@ struct p2d *p2d_area(const struct p2d *p, double first, double next)
|
||||
|
||||
t = p2d_hsort(p);
|
||||
recurse_area(t, first, next, &last);
|
||||
p2d_hier_free(t, 1);
|
||||
p2d_hier_free(t);
|
||||
return res;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* p2d_hsort.c - Hierarchical polygon sort
|
||||
*
|
||||
* Written 2012, 2013 by Werner Almesberger
|
||||
* Copyright 2012, 2013 Werner Almesberger
|
||||
* Written 2012 by Werner Almesberger
|
||||
* Copyright 2012 Werner Almesberger
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -92,17 +92,16 @@ struct p2d_hier *p2d_hsort(const struct p2d *p)
|
||||
}
|
||||
|
||||
|
||||
void p2d_hier_free(struct p2d_hier *t, bool free_poly)
|
||||
void p2d_hier_free(struct p2d_hier *t)
|
||||
{
|
||||
struct p2d_hier *next;
|
||||
struct p2d *p;
|
||||
|
||||
while (t) {
|
||||
p2d_hier_free(t->holes, free_poly);
|
||||
p2d_hier_free(t->holes);
|
||||
p = &t->p;
|
||||
next = p2d_to_hier(p->next);
|
||||
if (free_poly)
|
||||
p2d_free(p);
|
||||
p2d_free(p);
|
||||
t = next;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* p2d_hsort.h - Hierarchical polygon sort
|
||||
*
|
||||
* Written 2012, 2013 by Werner Almesberger
|
||||
* Copyright 2012, 2013 Werner Almesberger
|
||||
* Written 2012 by Werner Almesberger
|
||||
* Copyright 2012 Werner Almesberger
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -14,8 +14,6 @@
|
||||
#ifndef P2D_HSORT_H
|
||||
#define P2D_HSORT_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "poly2d.h"
|
||||
|
||||
|
||||
@ -29,6 +27,6 @@ struct p2d_hier {
|
||||
|
||||
|
||||
struct p2d_hier *p2d_hsort(const struct p2d *p);
|
||||
void p2d_hier_free(struct p2d_hier *t, bool free_poly);
|
||||
void p2d_hier_free(struct p2d_hier *t);
|
||||
|
||||
#endif /* !P2D_HSORT_H */
|
||||
|
Loading…
Reference in New Issue
Block a user