Skip to content

Commit

Permalink
remove unused arg in base_set_new_pack
Browse files Browse the repository at this point in the history
  • Loading branch information
TanvirOnGH committed May 21, 2024
1 parent 2a3191a commit 4c6ad5e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions layout/map.lua
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ function map.construct_itempack(cls, wa, is_vertical, parent)
for i, item in ipairs(self.items) do
if not item.child or item.child:is_filled() then
local size = self.wa[direction] / weight * item.factor
local g = cut_geometry(area, self.is_vertical, size, i)
local g = cut_geometry(area, self.is_vertical, size)
if item.child then
item.child:set_wa(g)
else
Expand Down Expand Up @@ -694,9 +694,8 @@ function map.reset_tree()
end

-- Base layout scheme
-- TODO: fix unused arg
function map.base_set_new_pack(cls, wa, _, parent, factor)
local pack = map.construct_itempack(cls, wa, true, parent)
function map.base_set_new_pack(cls, wa, is_vertical, parent, factor)
local pack = map.construct_itempack(cls, wa, is_vertical, parent)
table.insert(parent.items, { child = pack, factor = factor or 1 })
return pack
end
Expand Down

0 comments on commit 4c6ad5e

Please sign in to comment.