Skip to content

Commit

Permalink
Remove some broken code from toyfloats.
Browse files Browse the repository at this point in the history
In the old implementation, we had to reconstruct the state of the queue
after moving things.  This is no longer necessary but the code was still
trying to do it, which meant some things ended up there twice.
  • Loading branch information
davidchisnall committed Jan 16, 2025
1 parent b350dd0 commit cd8636b
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions text/packages/cheriot/toyfloats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,6 @@ function buildPage(self)
if self.state.movefloatstate then
if math.abs(adjustment) > moveState.bestPenalty then
log("Moving floats made things worse, resetting to a previous queue state")
-- FIXME: This just puts everything back
for _, v in ipairs(moveState.moved) do
table.insert(self.state.outputQueue, v.location, v.entry)
end
consumed = moveState.bestConsumed
else
log("Moving floats improved layout, had ", moveState.bestPenalty, " now have ", adjustment)
end
Expand Down

0 comments on commit cd8636b

Please sign in to comment.