summaryrefslogtreecommitdiff
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
parentac12efd17d9f719b083d8af1eb5a06853835e8d6 (diff)
downloadplus-5b4e74ab44a2ae4eab9db71c860885802e2ba28d.tar.gz
plus-5b4e74ab44a2ae4eab9db71c860885802e2ba28d.tar.bz2
plus-5b4e74ab44a2ae4eab9db71c860885802e2ba28d.tar.xz
plus-5b4e74ab44a2ae4eab9db71c860885802e2ba28d.zip
Fix code style.
-rw-r--r--src/enums/being/attacktype.h3
-rw-r--r--src/enums/equipslot.h3
-rw-r--r--src/enums/gui/chatmsgtype.h6
-rw-r--r--src/enums/net/auctionsearchtype.h2
-rw-r--r--src/enums/net/packettypes.h6
-rw-r--r--src/gui/windows/charcreatedialog.cpp5
-rw-r--r--src/gui/windows/charcreatedialog.h1
-rw-r--r--src/gui/windows/chatwindow.h2
-rw-r--r--src/gui/windows/updaterwindow.cpp3
-rw-r--r--src/input/inputmanager.h1
-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
-rw-r--r--src/particle/imageparticle.h2
17 files changed, 29 insertions, 35 deletions
diff --git a/src/enums/being/attacktype.h b/src/enums/being/attacktype.h
index c040d66f9..02379e60a 100644
--- a/src/enums/being/attacktype.h
+++ b/src/enums/being/attacktype.h
@@ -42,5 +42,6 @@ namespace AttackType
TOUCH_SKILL = 12,
MISS = 0xffff // pseudo value for miss attacks
};
-}
+} // namespace AttackType
+
#endif // ENUMS_BEING_ATTACKTYPE_H
diff --git a/src/enums/equipslot.h b/src/enums/equipslot.h
index 8c6c5abbb..bd6423dee 100644
--- a/src/enums/equipslot.h
+++ b/src/enums/equipslot.h
@@ -53,7 +53,6 @@ namespace EquipSlot
SHADOW_ACCESSORY2_SLOT = 21,
VECTOREND
};
-}
-
+} // namespace EquipSlot
#endif // ENUMS_EQUIPSLOT_H
diff --git a/src/enums/gui/chatmsgtype.h b/src/enums/gui/chatmsgtype.h
index 94b9e62b3..baacb57fd 100644
--- a/src/enums/gui/chatmsgtype.h
+++ b/src/enums/gui/chatmsgtype.h
@@ -20,8 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef GUI_CHATMSGTYPE_H
-#define GUI_CHATMSGTYPE_H
+#ifndef ENUMS_GUI_CHATMSGTYPE_H
+#define ENUMS_GUI_CHATMSGTYPE_H
namespace ChatMsgType
{
@@ -39,4 +39,4 @@ namespace ChatMsgType
};
} // namespace ChatMsgType
-#endif // GUI_CHATMSGTYPE_H
+#endif // ENUMS_GUI_CHATMSGTYPE_H
diff --git a/src/enums/net/auctionsearchtype.h b/src/enums/net/auctionsearchtype.h
index e908e2d42..281db6875 100644
--- a/src/enums/net/auctionsearchtype.h
+++ b/src/enums/net/auctionsearchtype.h
@@ -31,7 +31,7 @@ namespace AuctionSearchType
Card = 2,
Misc = 3,
Name = 4,
- AuctionId = 5,
+ AuctionId = 5
};
} // namespace AuctionSearchType
diff --git a/src/enums/net/packettypes.h b/src/enums/net/packettypes.h
index b1349b216..4da22895a 100644
--- a/src/enums/net/packettypes.h
+++ b/src/enums/net/packettypes.h
@@ -18,8 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef ENUMS_NET_PACKETLIMITER_H
-#define ENUMS_NET_PACKETLIMITER_H
+#ifndef ENUMS_NET_PACKETTYPES_H
+#define ENUMS_NET_PACKETTYPES_H
enum PacketTypes
{
@@ -39,4 +39,4 @@ enum PacketTypes
PACKET_SIZE
};
-#endif // ENUMS_NET_PACKETLIMITER_H
+#endif // ENUMS_NET_PACKETTYPES_H
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index fe22b0317..1452433d6 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -35,7 +35,6 @@
#include "gui/windows/charselectdialog.h"
#include "gui/widgets/label.h"
#include "gui/widgets/playerbox.h"
-#include "gui/widgets/radiobutton.h"
#include "gui/widgets/slider.h"
#include "gui/widgets/tabstrip.h"
#include "gui/widgets/textfield.h"
@@ -216,7 +215,9 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
if (serverFeatures->haveCreateCharGender())
{
const int size = config.getIntValue("fontSize");
- mGenderStrip = new TabStrip(this, "gender_" + getWindowName(), size + 16);
+ mGenderStrip = new TabStrip(this,
+ "gender_" + getWindowName(),
+ size + 16);
mGenderStrip->setPressFirst(false);
mGenderStrip->addActionListener(this);
mGenderStrip->setActionEventId("gender_");
diff --git a/src/gui/windows/charcreatedialog.h b/src/gui/windows/charcreatedialog.h
index d179982ad..ed1a8fcf3 100644
--- a/src/gui/windows/charcreatedialog.h
+++ b/src/gui/windows/charcreatedialog.h
@@ -35,7 +35,6 @@ class Button;
class CharSelectDialog;
class Label;
class PlayerBox;
-class RadioButton;
class Slider;
class TabStrip;
class TextField;
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index df8ba8b06..d0af5a74c 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -23,8 +23,6 @@
#ifndef GUI_WINDOWS_CHATWINDOW_H
#define GUI_WINDOWS_CHATWINDOW_H
-#include "enums/being/beingdirection.h"
-
#include "enums/gui/chatmsgtype.h"
#include "gui/widgets/window.h"
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 37f0f283f..30477821e 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -1045,7 +1045,8 @@ bool UpdaterWindow::validateFile(const std::string &filePath,
unsigned long UpdaterWindow::getFileHash(const std::string &filePath)
{
int size = 0;
- const char *const buf = static_cast<const char*>(PhysFs::loadFile(filePath, size));
+ const char *const buf = static_cast<const char*>(
+ PhysFs::loadFile(filePath, size));
if (!buf)
return 0;
return Net::Download::adlerBuffer(buf, size);
diff --git a/src/input/inputmanager.h b/src/input/inputmanager.h
index 6205f2d11..672060a72 100644
--- a/src/input/inputmanager.h
+++ b/src/input/inputmanager.h
@@ -30,7 +30,6 @@
#include <list>
#include <string>
-#include <map>
#include <SDL_events.h>
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();
diff --git a/src/particle/imageparticle.h b/src/particle/imageparticle.h
index dcc705a71..a2fadde7a 100644
--- a/src/particle/imageparticle.h
+++ b/src/particle/imageparticle.h
@@ -27,8 +27,6 @@
#include "utils/stringmap.h"
-#include <map>
-
class Image;
/**