From 3ff57559e36d3254c64e334fbe3bdd47398fe16f Mon Sep 17 00:00:00 2001 From: x12xx12x <44411062+12xx12@users.noreply.github.com> Date: Thu, 2 Dec 2021 00:31:10 +0100 Subject: ItemHandler initialisation is a constant expression (#5344) * Transition to non-pointer item handler * That is my destructor - I decide when I leave this world * I declare your destruction private and you final --- src/UI/Window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/UI/Window.cpp') diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp index 23661e150..81704d6f0 100644 --- a/src/UI/Window.cpp +++ b/src/UI/Window.cpp @@ -696,7 +696,7 @@ void cWindow::OnMiddlePaintEnd(cPlayer & a_Player) // Fill available slots with full stacks of the dragging item const auto & DraggingItem = a_Player.GetDraggingItem(); - auto StackSize = ItemHandler(DraggingItem.m_ItemType)->GetMaxStackSize(); + auto StackSize = DraggingItem.GetMaxStackSize(); if (0 < DistributeItemToSlots(a_Player, DraggingItem, StackSize, a_Player.GetInventoryPaintSlots(), false)) { // If any items were distibuted, set dragging item empty -- cgit v1.2.3