diff options
author | David Thompson <dthompson@vistahigherlearning.com> | 2020-09-29 20:03:53 -0400 |
---|---|---|
committer | David Thompson <dthompson@vistahigherlearning.com> | 2020-09-29 20:04:20 -0400 |
commit | ad1e3139d2096aabfbb5627cb0e58ce86b1fdef5 (patch) | |
tree | 89f09779971a163b38d9a4bdd931693cfe84f163 | |
parent | b00da409c86f4120332bd7a36c71daf0a03375da (diff) |
node-2d: Use for-each-child instead of iterating children list directly.
-rw-r--r-- | starling/node-2d.scm | 12 |
1 files 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 <node-2d>)) |