Cleanup some compiler warnings

This commit is contained in:
2024-10-22 10:33:14 +01:00
parent e2330618f2
commit c0b1092fb6
6 changed files with 155 additions and 190 deletions
+3 -3
View File
@@ -316,7 +316,7 @@ updateMouseInventorySelection' sss cfig w
Just (MouseInvChosen ssel esel)
| maybe False (>esel) $ inverseSelBoundaryDown cfig ldp sss mpos -> w
& shiftInvItemsDown ssel esel (inverseSelBoundaryDown cfig ldp sss mpos)
Just (MouseInvChosen ssel esel) -> w
Just (MouseInvChosen{}) -> w
_ -> w
& hud . hudElement . subInventory . nsSelected .~ NoMouseSel
| otherwise = case w ^? hud . hudElement . subInventory . nsSelected of
@@ -338,7 +338,7 @@ updateMouseInventorySelection' sss cfig w
mysel = inverseSelSecYint (posSelSecYint cfig ldp (mpos ^. _y)) sss
shiftInvItemsUp :: (Int,Int) -> (Int,Int) -> Maybe (Int,Int) -> World -> World
shiftInvItemsUp (_,i) (_,j) (Just (_,k)) w = w
shiftInvItemsUp (_,i) (_,j) Just{} w = w
& flip (foldl' f) [i..j]
& hud . hudElement . subInventory . nsSelected . misChosenStart . _2 -~ 1
& hud . hudElement . subInventory . nsSelected . misChosenEnd . _2 -~ 1
@@ -348,7 +348,7 @@ shiftInvItemsUp (_,i) (_,j) (Just (_,k)) w = w
shiftInvItemsUp _ _ Nothing w = w
shiftInvItemsDown :: (Int,Int) -> (Int,Int) -> Maybe (Int,Int) -> World -> World
shiftInvItemsDown (_,i) (_,j) (Just (_,k)) w = w
shiftInvItemsDown (_,i) (_,j) Just{} w = w
& flip (foldl' f) (reverse [i..j])
& hud . hudElement . subInventory . nsSelected . misChosenStart . _2 +~ 1
& hud . hudElement . subInventory . nsSelected . misChosenEnd . _2 +~ 1