changeset 4739:257dd6039a28

More code simplification.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 18 Oct 2019 12:01:21 +0200
parents a0a4298a4756
children 2440d2f86f4e
files pkg/octree/areas.go
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/octree/areas.go	Fri Oct 18 11:57:26 2019 +0200
+++ b/pkg/octree/areas.go	Fri Oct 18 12:01:21 2019 +0200
@@ -361,10 +361,6 @@
 type bboxOutFunc func(contour, []contour)
 
 func (bn *bboxNode) generate(out bboxOutFunc) {
-	if len(bn.children) == 0 {
-		out(bn.cnt, nil)
-		return
-	}
 
 	var grands []*bboxNode
 
@@ -375,6 +371,8 @@
 		grands = append(grands, ch.children...)
 	}
 	out(bn.cnt, holes)
+
+	// the grand children are new polygons.
 	for _, grand := range grands {
 		grand.generate(out)
 	}