From be1719093f07d2545a0d6bfe5710e1fc0b93b2f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 23 Dec 2017 23:18:06 +0300 Subject: Remove default parameters from dropshortcut. --- src/being/crazymoves.cpp | 2 +- src/gui/shortcut/dropshortcut.cpp | 2 +- src/gui/shortcut/dropshortcut.h | 4 ++-- src/progs/manaplus/actions/actions.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/being/crazymoves.cpp b/src/being/crazymoves.cpp index 0fe46791d..b97de3805 100644 --- a/src/being/crazymoves.cpp +++ b/src/being/crazymoves.cpp @@ -701,7 +701,7 @@ void CrazyMoves::crazyMoveAd() const dropShortcut->dropFirst(); break; case 'a': - dropShortcut->dropItems(); + dropShortcut->dropItems(1); break; default: break; diff --git a/src/gui/shortcut/dropshortcut.cpp b/src/gui/shortcut/dropshortcut.cpp index f9876ebee..f71c9d5c7 100644 --- a/src/gui/shortcut/dropshortcut.cpp +++ b/src/gui/shortcut/dropshortcut.cpp @@ -103,7 +103,7 @@ void DropShortcut::dropItems(const int cnt) { if (!PacketLimiter::limitPackets(PacketType::PACKET_DROP)) return; - if (dropItem()) + if (dropItem(1)) n++; } if (n >= cnt) diff --git a/src/gui/shortcut/dropshortcut.h b/src/gui/shortcut/dropshortcut.h index b3993b96e..a6e87c05d 100644 --- a/src/gui/shortcut/dropshortcut.h +++ b/src/gui/shortcut/dropshortcut.h @@ -53,13 +53,13 @@ class DropShortcut final : public ShortcutBase /** * Drop all items in cicle. */ - void dropItems(const int cnt = 1); + void dropItems(const int cnt); private: /** * Drop item in cicle. */ - bool dropItem(const int cnt = 1); + bool dropItem(const int cnt); int mLastDropIndex; }; diff --git a/src/progs/manaplus/actions/actions.cpp b/src/progs/manaplus/actions/actions.cpp index 9ec38cf20..4f1998e2b 100644 --- a/src/progs/manaplus/actions/actions.cpp +++ b/src/progs/manaplus/actions/actions.cpp @@ -456,7 +456,7 @@ impHandler0(dropItem) { if (dropShortcut != nullptr) { - dropShortcut->dropItems(); + dropShortcut->dropItems(1); return true; } return false; -- cgit v1.2.3-70-g09d2