From b3cf7bd2daeb46a613611e8a5d3f47736b5780e9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 18 Dec 2017 00:51:34 +0300 Subject: Remove default parameter from inventory. --- src/being/playerinfo.cpp | 4 ++-- src/gui/windows/tradewindow.cpp | 4 ++-- src/resources/inventory/inventory.h | 4 ++-- src/unittests/gui/windowmanager.cc | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp index d56934d31..45c8dff15 100644 --- a/src/being/playerinfo.cpp +++ b/src/being/playerinfo.cpp @@ -470,9 +470,9 @@ void stateChange(const StateT state) { if (mInventory == nullptr) { - mInventory = new Inventory(InventoryType::Inventory); + mInventory = new Inventory(InventoryType::Inventory, -1); mEquipment = new Equipment; - mCartInventory = new Inventory(InventoryType::Cart); + mCartInventory = new Inventory(InventoryType::Cart, -1); } } } diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp index bd8ba020f..be67e2432 100644 --- a/src/gui/windows/tradewindow.cpp +++ b/src/gui/windows/tradewindow.cpp @@ -77,8 +77,8 @@ TradeWindow::TradeWindow() : Window(_("Trade: You"), Modal_false, nullptr, "trade.xml"), ActionListener(), SelectionListener(), - mMyInventory(new Inventory(InventoryType::Trade)), - mPartnerInventory(new Inventory(InventoryType::Trade)), + mMyInventory(new Inventory(InventoryType::Trade, -1)), + mPartnerInventory(new Inventory(InventoryType::Trade, -1)), mMyItemContainer(new ItemContainer(this, mMyInventory)), mPartnerItemContainer(new ItemContainer(this, mPartnerInventory)), // TRANSLATORS: trade window money label diff --git a/src/resources/inventory/inventory.h b/src/resources/inventory/inventory.h index 573a0f5c0..9286fbdc5 100644 --- a/src/resources/inventory/inventory.h +++ b/src/resources/inventory/inventory.h @@ -61,8 +61,8 @@ class Inventory notfinal * * @param size the number of items that fit in the inventory */ - explicit Inventory(const InventoryTypeT type, - const int size = -1); + Inventory(const InventoryTypeT type, + const int size); /** * Destructor. diff --git a/src/unittests/gui/windowmanager.cc b/src/unittests/gui/windowmanager.cc index b7f1eee43..92ea50920 100644 --- a/src/unittests/gui/windowmanager.cc +++ b/src/unittests/gui/windowmanager.cc @@ -452,7 +452,7 @@ TEST_CASE("Windows tests", "windowmanager") } SECTION("InventoryWindow") { - Inventory *inventory = new Inventory(InventoryType::Inventory); + Inventory *inventory = new Inventory(InventoryType::Inventory, -1); InventoryWindow *dialog = CREATEWIDGETR(InventoryWindow, inventory); gui->draw(); -- cgit v1.2.3-60-g2f50