Skip to content

Commit b5cc7f7

Browse files
committed
Remove iteration clauses from LOOP body code
While here, properly sharpquote CDDR in an intervening LOOP.
1 parent bbada6d commit b5cc7f7

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

chazelle.lisp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,8 @@
763763
(let ((gap nil)
764764
;; bottom of vertical edge
765765
(v1 (dll-prev v)))
766-
(loop while (and (hv-n v)
767-
(hv-q v))
768-
for n = (hv-n v)
766+
(loop for n = (hv-n v)
767+
while (and n (hv-q v))
769768
do (push (list (hv-y v)
770769
(- (hv-y (hv-n v))
771770
(hv-y v)))
@@ -1026,7 +1025,7 @@
10261025
(defun %make-hole-from-points (points)
10271026
;; points should be (x1 y1 x2 y2 ...), clockwise around hole
10281027
(make-hole
1029-
(loop for (x y) on points by 'cddr
1028+
(loop for (x y) on points by #'cddr
10301029
for v = (make-hole-vertex x y nil)
10311030
then (make-hole-vertex x y v)
10321031
finally (return v))))
@@ -1283,10 +1282,11 @@
12831282
(destructuring-bind (sl sr) (top1 q1)
12841283
(assert (= (y sl) (y sr)))
12851284
(loop while (not (deq-empty-p q))
1286-
for (ql qr) = (top2 q)
1287-
do (assert (= (y ql) (y qr)))
1288-
while (<=y ql sl)
1289-
do (pop2 q))))
1285+
do (destructuring-bind (ql qr) (top2 q)
1286+
(assert (= (y ql) (y qr)))
1287+
(unless (<=y ql sl)
1288+
(return))
1289+
(pop2 q)))))
12901290
(loop for x = (top1 q1)
12911291
until (deq-empty-p q1)
12921292
do (push2 x q)

0 commit comments

Comments
 (0)