From ad1e3139d2096aabfbb5627cb0e58ce86b1fdef5 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 29 Sep 2020 20:03:53 -0400 Subject: node-2d: Use for-each-child instead of iterating children list directly. --- starling/node-2d.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/starling/node-2d.scm b/starling/node-2d.scm index bf7fe3f..6a33ed3 100644 --- a/starling/node-2d.scm +++ b/starling/node-2d.scm @@ -254,9 +254,9 @@ ;; Draw scene from the viewpoint of each camera. (for-each (lambda (view) (with-camera (camera view) - (for-each (lambda (child) - (render-tree child alpha)) - (children canvas)))) + (for-each-child (lambda (child) + (render-tree child alpha)) + canvas))) (views canvas)) (render canvas alpha)) @@ -450,9 +450,9 @@ (set! (dirty-matrix? node) #f) ;; If the parent is dirty, all the children need to be marked as ;; dirty, too. - (for-each (lambda (node) - (set! (dirty-matrix? node) #t)) - (children node)))) + (for-each-child (lambda (child) + (set! (dirty-matrix? child) #t)) + node))) (next-method)) (define-method (activate (node )) -- cgit v1.2.3