summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/auctionhandler.cpp4
-rw-r--r--src/net/eathena/charserverhandler.cpp4
-rw-r--r--src/net/eathena/searchstorehandler.cpp2
-rw-r--r--src/net/eathena/vendinghandler.cpp12
-rw-r--r--src/net/tmwa/auctionhandler.h6
-rw-r--r--src/net/tmwa/charserverhandler.cpp2
6 files changed, 14 insertions, 16 deletions
diff --git a/src/net/eathena/auctionhandler.cpp b/src/net/eathena/auctionhandler.cpp
index 6ef2ca81c..1fe68d760 100644
--- a/src/net/eathena/auctionhandler.cpp
+++ b/src/net/eathena/auctionhandler.cpp
@@ -127,7 +127,7 @@ void AuctionHandler::processAuctionClose(Net::MessageIn &msg)
void AuctionHandler::cancelReg() const
{
createOutPacket(CMSG_AUCTION_CANCEL_REG);
- outMsg.writeInt16(0, "type"); // unused
+ outMsg.writeInt16(0, "type"); // unused
}
void AuctionHandler::setItem(const Item *const item,
@@ -178,7 +178,7 @@ void AuctionHandler::search(const AuctionSearchType::Type type,
outMsg.writeInt16(static_cast<int16_t>(type), "search type");
outMsg.writeInt32(auctionId, "auction id");
outMsg.writeString(text, 24, "search text");
- outMsg.writeInt16(page, "page");
+ outMsg.writeInt16(static_cast<int16_t>(page), "page");
}
void AuctionHandler::buy() const
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp
index 09d5257ce..c3d3665ad 100644
--- a/src/net/eathena/charserverhandler.cpp
+++ b/src/net/eathena/charserverhandler.cpp
@@ -285,7 +285,7 @@ void CharServerHandler::newCharacter(const std::string &name, const int slot,
outMsg.writeInt16(static_cast<int16_t>(race), "race");
if (serverFeatures->haveCreateCharGender())
{
- int sex = 0;
+ uint8_t sex = 0;
if (gender == Gender::UNSPECIFIED)
sex = 99;
else
@@ -606,7 +606,7 @@ void CharServerHandler::processCharChangeSlot(Net::MessageIn &msg)
msg.readInt16("unused");
}
-void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg A_UNUSED)
+void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg)
{
BLOCK_START("CharServerHandler::processCharDeleteFailed")
unlockCharSelectDialog();
diff --git a/src/net/eathena/searchstorehandler.cpp b/src/net/eathena/searchstorehandler.cpp
index 602a8dce1..38baadd6d 100644
--- a/src/net/eathena/searchstorehandler.cpp
+++ b/src/net/eathena/searchstorehandler.cpp
@@ -20,8 +20,6 @@
#include "net/eathena/searchstorehandler.h"
-#include "net/eathena/protocol.h"
-
#include "debug.h"
extern Net::SearchStoreHandler *searchStoreHandler;
diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp
index 47428a040..3228cf0db 100644
--- a/src/net/eathena/vendinghandler.cpp
+++ b/src/net/eathena/vendinghandler.cpp
@@ -182,8 +182,8 @@ void VendingHandler::buy(const Being *const being,
createOutPacket(CMSG_VENDING_BUY);
outMsg.writeInt16(12, "len");
outMsg.writeInt32(being->getId(), "account id");
- outMsg.writeInt16(amount, "amount");
- outMsg.writeInt16(index, "index");
+ outMsg.writeInt16(static_cast<int16_t>(amount), "amount");
+ outMsg.writeInt16(static_cast<int16_t>(index), "index");
}
void VendingHandler::buy2(const Being *const being,
@@ -198,8 +198,8 @@ void VendingHandler::buy2(const Being *const being,
outMsg.writeInt16(16, "len");
outMsg.writeInt32(being->getId(), "account id");
outMsg.writeInt32(vendId, "vend id");
- outMsg.writeInt16(amount, "amount");
- outMsg.writeInt16(index, "index");
+ outMsg.writeInt16(static_cast<int16_t>(amount), "amount");
+ outMsg.writeInt16(static_cast<int16_t>(index), "index");
}
void VendingHandler::createShop(const std::string &name,
@@ -207,9 +207,9 @@ void VendingHandler::createShop(const std::string &name,
std::vector<ShopItem*> &items) const
{
createOutPacket(CMSG_VENDING_CREATE_SHOP);
- outMsg.writeInt16(85 + items.size() * 8, "len");
+ outMsg.writeInt16(static_cast<int16_t>(85 + items.size() * 8), "len");
outMsg.writeString(name, 80, "shop name");
- outMsg.writeInt8(flag ? 1 : 0, "flag");
+ outMsg.writeInt8(static_cast<int8_t>(flag ? 1 : 0), "flag");
FOR_EACH (std::vector<ShopItem*>::const_iterator, it, items)
{
const ShopItem *const item = *it;
diff --git a/src/net/tmwa/auctionhandler.h b/src/net/tmwa/auctionhandler.h
index f3c1fe9c8..5f793a78d 100644
--- a/src/net/tmwa/auctionhandler.h
+++ b/src/net/tmwa/auctionhandler.h
@@ -54,9 +54,9 @@ class AuctionHandler final : public MessageHandler, public Net::AuctionHandler
const int money) const override final;
void search(const AuctionSearchType::Type type,
- const int auctionId,
- const std::string &text,
- const int page) const override final;
+ const int auctionId,
+ const std::string &text,
+ const int page) const override final;
void buy() const override final;
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index a61d00e7c..a8815da5b 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -525,7 +525,7 @@ void CharServerHandler::changeSlot(const int oldSlot A_UNUSED,
{
}
-void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg A_UNUSED)
+void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg)
{
BLOCK_START("CharServerHandler::processCharDeleteFailed")
unlockCharSelectDialog();