summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-11 21:49:16 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-11 21:49:16 +0300
commit5b4e74ab44a2ae4eab9db71c860885802e2ba28d (patch)
tree065e1c4a5c5639b77789e7cf51ca25efeeb7e86a /src/net/eathena
parentac12efd17d9f719b083d8af1eb5a06853835e8d6 (diff)
downloadplus-5b4e74ab44a2ae4eab9db71c860885802e2ba28d.tar.gz
plus-5b4e74ab44a2ae4eab9db71c860885802e2ba28d.tar.bz2
plus-5b4e74ab44a2ae4eab9db71c860885802e2ba28d.tar.xz
plus-5b4e74ab44a2ae4eab9db71c860885802e2ba28d.zip
Fix code style.
Diffstat (limited to 'src/net/eathena')
-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
4 files changed, 10 insertions, 12 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;