summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/buysellhandler.h10
-rw-r--r--src/net/ea/buysellhandler.cpp10
-rw-r--r--src/net/ea/buysellhandler.h10
3 files changed, 18 insertions, 12 deletions
diff --git a/src/net/buysellhandler.h b/src/net/buysellhandler.h
index 3fbcbe733..dc41f63dc 100644
--- a/src/net/buysellhandler.h
+++ b/src/net/buysellhandler.h
@@ -42,11 +42,13 @@ class BuySellHandler
virtual void requestBuyList(std::string nick) = 0;
- virtual void sendBuyRequest(std::string nick, ShopItem* item,
- int amount) = 0;
+ virtual void sendBuyRequest(const std::string &nick,
+ const ShopItem *const item,
+ const int amount) = 0;
- virtual void sendSellRequest(std::string nick, ShopItem* item,
- int amount) = 0;
+ virtual void sendSellRequest(const std::string &nick,
+ const ShopItem *const item,
+ const int amount) = 0;
};
} // namespace Net
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp
index d9080b969..8566bcab7 100644
--- a/src/net/ea/buysellhandler.cpp
+++ b/src/net/ea/buysellhandler.cpp
@@ -90,8 +90,9 @@ void BuySellHandler::requestBuyList(std::string nick)
}
}
-void BuySellHandler::sendBuyRequest(std::string nick, ShopItem* item,
- int amount)
+void BuySellHandler::sendBuyRequest(const std::string &nick,
+ const ShopItem *const item,
+ const int amount)
{
if (!chatWindow || nick.empty() || !item ||
amount < 1 || amount > item->getQuantity())
@@ -107,8 +108,9 @@ void BuySellHandler::sendBuyRequest(std::string nick, ShopItem* item,
chatWindow->addWhisper(nick, data, BY_PLAYER);
}
-void BuySellHandler::sendSellRequest(std::string nick, ShopItem* item,
- int amount)
+void BuySellHandler::sendSellRequest(const std::string &nick,
+ const ShopItem *const item,
+ const int amount)
{
if (!chatWindow || nick.empty() || !item ||
amount < 1 || amount > item->getQuantity())
diff --git a/src/net/ea/buysellhandler.h b/src/net/ea/buysellhandler.h
index 14d39ea02..26f0d2716 100644
--- a/src/net/ea/buysellhandler.h
+++ b/src/net/ea/buysellhandler.h
@@ -43,11 +43,13 @@ class BuySellHandler : public Net::BuySellHandler
virtual void requestBuyList(std::string nick);
- virtual void sendBuyRequest(std::string nick, ShopItem* item,
- int amount);
+ virtual void sendBuyRequest(const std::string &nick,
+ const ShopItem *const item,
+ const int amount);
- virtual void sendSellRequest(std::string nick, ShopItem* item,
- int amount);
+ virtual void sendSellRequest(const std::string &nick,
+ const ShopItem *const item,
+ const int amount);
virtual void processNpcBuySellChoice(Net::MessageIn &msg);