Attempt to fix some space leaks, general cleanup

This commit is contained in:
2022-08-23 23:00:12 +01:00
parent 9f00e67298
commit e7e20277e4
12 changed files with 71 additions and 263 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ module Dodge.Wall.Delete (
deleteWallID,
) where
import Data.Foldable
import Control.Lens
import qualified Data.IntSet as IS
import Dodge.Data.World
@@ -24,4 +25,4 @@ deleteWall wl =
i = _wlID wl
deleteWallIDs :: IS.IntSet -> World -> World
deleteWallIDs is w = foldr deleteWall w $ IM.restrictKeys (_walls (_cWorld w)) is
deleteWallIDs is w = foldl' (flip deleteWall) w $ IM.restrictKeys (_walls (_cWorld w)) is