From: Ian Jackson Date: Sat, 21 Nov 2020 17:36:43 +0000 (+0000) Subject: lower: drop duplicate calculation X-Git-Tag: otter-0.2.0~431 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9c3325f01af8c63d924ee61f845b25bbcbb03e77;p=otter.git lower: drop duplicate calculation Signed-off-by: Ian Jackson --- diff --git a/templates/script.ts b/templates/script.ts index 5ea582aa..3d036b48 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -367,13 +367,11 @@ function lower_targets(uo: UoRecord): boolean { } let targets_todo : LowerTodoList = Object.create(null); - let n_targets_todo_unpinned = 0; for (let piece of uo.targets!) { let p = pieces[piece]!; let pinned = target_treat_pinned(p); targets_todo[piece] = { p, piece, pinned, }; - if (!pinned) { n_targets_todo_unpinned++; } } let problem = lower_pieces(targets_todo); if (problem !== null) { @@ -428,7 +426,6 @@ function lower_pieces(targets_todo: LowerTodoList): let tomove_pinned : Entry[] = []; let bottommost_unpinned : Entry | null = null; - // xxx this duplicates stuff in keyops let n_targets_todo_unpinned = 0; for (const piece of Object.keys(targets_todo)) { let p = targets_todo[piece];