From 35d796b927447760772d2720a221e21fdf9fd10e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 24 Dec 2017 04:42:20 +0300 Subject: Remove default parameters from icon. --- src/gui/popups/itempopup.cpp | 2 +- src/gui/widgets/icon.h | 4 ++-- src/gui/windows/itemamountwindow.cpp | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp index 28de3b641..9c0607a2f 100644 --- a/src/gui/popups/itempopup.cpp +++ b/src/gui/popups/itempopup.cpp @@ -71,7 +71,7 @@ ItemPopup::ItemPopup() : mItemCards(new TextBox(this)), mItemOptions(new TextBox(this)), mItemType(ItemDbType::UNUSABLE), - mIcon(new Icon(this, nullptr)), + mIcon(new Icon(this, nullptr, AutoRelease_false)), mLastName(), mCardsStr(), mItemOptionsStr(), diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h index f0849d505..8d7bdc13e 100644 --- a/src/gui/widgets/icon.h +++ b/src/gui/widgets/icon.h @@ -44,14 +44,14 @@ class Icon final : public Widget */ Icon(const Widget2 *const widget, const std::string &filename, - const AutoRelease autoRelease = AutoRelease_false); + const AutoRelease autoRelease); /** * Constructor, uses an existing Image. */ Icon(const Widget2 *const widget, Image *const image, - const AutoRelease autoRelease = AutoRelease_false); + const AutoRelease autoRelease); A_DELETE_COPY(Icon) diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index 41916c514..75a2361bf 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -139,7 +139,8 @@ ItemAmountWindow::ItemAmountWindow(const ItemAmountWindowUsageT usage, mItemPriceTextField(nullptr), mGPLabel(nullptr), mItem(item), - mItemIcon(new Icon(this, item != nullptr ? item->getImage() : nullptr)), + mItemIcon(new Icon(this, + item != nullptr ? item->getImage() : nullptr, AutoRelease_false)), mItemAmountSlide(new Slider(this, 1.0, maxRange, 1.0)), mItemPriceSlide(nullptr), mItemDropDown(nullptr), -- cgit v1.2.3-70-g09d2