diff options
Diffstat (limited to 'src/shopitem.cpp')
-rw-r--r-- | src/shopitem.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shopitem.cpp b/src/shopitem.cpp index d6bb1d49..ee55799f 100644 --- a/src/shopitem.cpp +++ b/src/shopitem.cpp @@ -51,8 +51,7 @@ ShopItem::~ShopItem() } } -void ShopItem::addDuplicate(int inventoryIndex, - int quantity) +void ShopItem::addDuplicate(int inventoryIndex, int quantity) { DuplicateItem* di = new DuplicateItem; di->inventoryIndex = inventoryIndex; @@ -76,7 +75,8 @@ int ShopItem::sellCurrentDuplicate(int quantity) int sellCount = quantity <= dupl->quantity ? quantity : dupl->quantity; dupl->quantity -= sellCount; mQuantity -= sellCount; - if (dupl->quantity == 0) { + if (dupl->quantity == 0) + { delete dupl; mDuplicates.pop(); } |