summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actormanager.h2
-rw-r--r--src/being/actorsprite.h5
-rw-r--r--src/being/localplayer.h2
-rw-r--r--src/gui/widgets/itemcontainer.cpp7
-rw-r--r--src/gui/widgets/tabs/socialplayerstab.h2
-rw-r--r--src/gui/windows/tradewindow.h2
-rw-r--r--src/net/eathena/beinghandler.cpp3
-rw-r--r--src/net/eathena/mailhandler.cpp18
-rw-r--r--src/net/eathena/mailhandler.h18
-rw-r--r--src/net/mailhandler.h18
-rw-r--r--src/net/playerhandler.h2
-rw-r--r--src/net/tmwa/mailhandler.cpp18
-rw-r--r--src/net/tmwa/mailhandler.h18
-rw-r--r--src/statuseffect.h3
14 files changed, 55 insertions, 63 deletions
diff --git a/src/actormanager.h b/src/actormanager.h
index b6a9eb703..53ba65e18 100644
--- a/src/actormanager.h
+++ b/src/actormanager.h
@@ -25,8 +25,6 @@
#include "flooritem.h"
-#include "enums/simpletypes.h"
-
#include "listeners/configlistener.h"
#include "utils/stringmap.h"
diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h
index 24051ea2c..d219309c4 100644
--- a/src/being/actorsprite.h
+++ b/src/being/actorsprite.h
@@ -22,8 +22,6 @@
#ifndef BEING_ACTORSPRITE_H
#define BEING_ACTORSPRITE_H
-#include "enums/simpletypes.h"
-
#include "resources/map/blocktype.h"
#include "resources/map/mapconsts.h"
@@ -188,7 +186,8 @@ class ActorSprite notfinal : public CompoundSprite, public Actor
* Notify self that a status effect has flipped.
* The new flag is passed.
*/
- virtual void updateStatusEffect(const int index, const Enable newStatus);
+ virtual void updateStatusEffect(const int index,
+ const Enable newStatus);
/**
* Handle an update to a status or stun effect
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index a4f26dcff..2ada30488 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -25,8 +25,6 @@
#include "being/being.h"
-#include "enums/simpletypes.h"
-
#include "enums/being/pickup.h"
#include "gui/userpalette.h"
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index f7dec4452..4849591a6 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -595,11 +595,12 @@ void ItemContainer::mouseReleased(MouseEvent &event)
inventory = PlayerInfo::getInventory();
}
else if (src == DRAGDROP_SOURCE_INVENTORY
- && (dst == DRAGDROP_SOURCE_NPC
#ifdef EATHENA_SUPPORT
- || dst == DRAGDROP_SOURCE_MAIL
+ && (dst == DRAGDROP_SOURCE_NPC
+ || dst == DRAGDROP_SOURCE_MAIL))
+#else
+ && dst == DRAGDROP_SOURCE_NPC)
#endif
- ))
{
inventory = PlayerInfo::getInventory();
const Item *const item = inventory->getItem(dragDrop.getTag());
diff --git a/src/gui/widgets/tabs/socialplayerstab.h b/src/gui/widgets/tabs/socialplayerstab.h
index 7fee69deb..a7634014b 100644
--- a/src/gui/widgets/tabs/socialplayerstab.h
+++ b/src/gui/widgets/tabs/socialplayerstab.h
@@ -28,8 +28,6 @@
#include "being/being.h"
-#include "enums/simpletypes.h"
-
#include "gui/models/beingslistmodel.h"
#include "utils/gettext.h"
diff --git a/src/gui/windows/tradewindow.h b/src/gui/windows/tradewindow.h
index b93c53507..6c5745c66 100644
--- a/src/gui/windows/tradewindow.h
+++ b/src/gui/windows/tradewindow.h
@@ -23,8 +23,6 @@
#ifndef GUI_WINDOWS_TRADEWINDOW_H
#define GUI_WINDOWS_TRADEWINDOW_H
-#include "enums/simpletypes.h"
-
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 93733d2fa..5ff11ee83 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -1615,7 +1615,8 @@ void BeingHandler::processPlaterStatusChangeNoTick(Net::MessageIn &msg)
{
const uint16_t status = msg.readInt16("index");
const int id = msg.readInt32("account id");
- const Enable flag = fromBool(msg.readUInt8("state") ? true : false, Enable);
+ const Enable flag = fromBool(msg.readUInt8("state")
+ ? true : false, Enable);
Being *const dstBeing = actorManager->findBeing(id);
if (!dstBeing)
diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp
index e154ad406..0f74e0af2 100644
--- a/src/net/eathena/mailhandler.cpp
+++ b/src/net/eathena/mailhandler.cpp
@@ -261,51 +261,51 @@ void MailHandler::processMailReturn(Net::MessageIn &msg)
}
}
-void MailHandler::refresh()
+void MailHandler::refresh() const
{
createOutPacket(CMSG_MAIL_REFRESH_INBOX);
}
-void MailHandler::readMessage(const int msgId)
+void MailHandler::readMessage(const int msgId) const
{
createOutPacket(CMSG_MAIL_READ_MESSAGE);
outMsg.writeInt32(msgId, "message id");
}
-void MailHandler::getAttach(const int msgId)
+void MailHandler::getAttach(const int msgId) const
{
createOutPacket(CMSG_MAIL_GET_ATTACH);
outMsg.writeInt32(msgId, "message id");
}
-void MailHandler::deleteMessage(const int msgId)
+void MailHandler::deleteMessage(const int msgId) const
{
createOutPacket(CMSG_MAIL_DELETE_MESSAGE);
outMsg.writeInt32(msgId, "message id");
}
-void MailHandler::returnMessage(const int msgId)
+void MailHandler::returnMessage(const int msgId) const
{
createOutPacket(CMSG_MAIL_RETURN_MESSAGE);
outMsg.writeInt32(msgId, "message id");
outMsg.writeString("", 24, "unused");
}
-void MailHandler::setAttach(const int index, const int amount)
+void MailHandler::setAttach(const int index, const int amount) const
{
createOutPacket(CMSG_MAIL_SET_ATTACH);
outMsg.writeInt16(static_cast<int16_t>(index + INVENTORY_OFFSET), "index");
outMsg.writeInt32(amount, "amount");
}
-void MailHandler::setAttachMoney(const int money)
+void MailHandler::setAttachMoney(const int money) const
{
createOutPacket(CMSG_MAIL_SET_ATTACH);
outMsg.writeInt16(static_cast<int16_t>(0), "index");
outMsg.writeInt32(money, "money");
}
-void MailHandler::resetAttach(const int flag)
+void MailHandler::resetAttach(const int flag) const
{
createOutPacket(CMSG_MAIL_RESET_ATTACH);
outMsg.writeInt16(static_cast<int16_t>(flag), "flag");
@@ -313,7 +313,7 @@ void MailHandler::resetAttach(const int flag)
void MailHandler::send(const std::string &name,
const std::string &title,
- std::string message)
+ std::string message) const
{
if (message.size() > 255)
message = message.substr(0, 255);
diff --git a/src/net/eathena/mailhandler.h b/src/net/eathena/mailhandler.h
index 3b0d17574..88e1e0e25 100644
--- a/src/net/eathena/mailhandler.h
+++ b/src/net/eathena/mailhandler.h
@@ -38,25 +38,25 @@ class MailHandler final : public MessageHandler, public Net::MailHandler
void handleMessage(Net::MessageIn &msg) override final;
- void refresh() override final;
+ void refresh() const override final;
- void readMessage(const int msgId) override final;
+ void readMessage(const int msgId) const override final;
- void getAttach(const int msgId) override final;
+ void getAttach(const int msgId) const override final;
- void deleteMessage(const int msgId) override final;
+ void deleteMessage(const int msgId) const override final;
- void returnMessage(const int msgId) override final;
+ void returnMessage(const int msgId) const override final;
- void setAttach(const int index, const int amount) override final;
+ void setAttach(const int index, const int amount) const override final;
- void setAttachMoney(const int money) override final;
+ void setAttachMoney(const int money) const override final;
- void resetAttach(const int flag) override final;
+ void resetAttach(const int flag) const override final;
void send(const std::string &name,
const std::string &title,
- std::string message) override final;
+ std::string message) const override final;
protected:
static void processMailOpen(Net::MessageIn &msg);
diff --git a/src/net/mailhandler.h b/src/net/mailhandler.h
index e4e5a424d..3a83ab163 100644
--- a/src/net/mailhandler.h
+++ b/src/net/mailhandler.h
@@ -36,25 +36,25 @@ class MailHandler notfinal
virtual ~MailHandler()
{ }
- virtual void refresh() = 0;
+ virtual void refresh() const = 0;
- virtual void readMessage(const int msgId) = 0;
+ virtual void readMessage(const int msgId) const = 0;
- virtual void getAttach(const int msgId) = 0;
+ virtual void getAttach(const int msgId) const = 0;
- virtual void deleteMessage(const int msgId) = 0;
+ virtual void deleteMessage(const int msgId) const = 0;
- virtual void returnMessage(const int msgId) = 0;
+ virtual void returnMessage(const int msgId) const = 0;
- virtual void setAttach(const int index, const int amount) = 0;
+ virtual void setAttach(const int index, const int amount) const = 0;
- virtual void setAttachMoney(const int money) = 0;
+ virtual void setAttachMoney(const int money) const = 0;
- virtual void resetAttach(const int flag) = 0;
+ virtual void resetAttach(const int flag) const = 0;
virtual void send(const std::string &name,
const std::string &title,
- std::string message) = 0;
+ std::string message) const = 0;
};
} // namespace Net
diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h
index af4b09958..85a159db5 100644
--- a/src/net/playerhandler.h
+++ b/src/net/playerhandler.h
@@ -25,8 +25,6 @@
#include "flooritem.h"
-#include "enums/simpletypes.h"
-
#include "enums/being/beingaction.h"
#include "net/messagein.h"
diff --git a/src/net/tmwa/mailhandler.cpp b/src/net/tmwa/mailhandler.cpp
index 53a1faba5..911436972 100644
--- a/src/net/tmwa/mailhandler.cpp
+++ b/src/net/tmwa/mailhandler.cpp
@@ -42,42 +42,42 @@ void MailHandler::handleMessage(Net::MessageIn &msg A_UNUSED)
{
}
-void MailHandler::refresh()
+void MailHandler::refresh() const
{
}
-void MailHandler::readMessage(const int msgId A_UNUSED)
+void MailHandler::readMessage(const int msgId A_UNUSED) const
{
}
-void MailHandler::getAttach(const int msgId A_UNUSED)
+void MailHandler::getAttach(const int msgId A_UNUSED) const
{
}
-void MailHandler::deleteMessage(const int msgId A_UNUSED)
+void MailHandler::deleteMessage(const int msgId A_UNUSED) const
{
}
-void MailHandler::returnMessage(const int msgId A_UNUSED)
+void MailHandler::returnMessage(const int msgId A_UNUSED) const
{
}
void MailHandler::setAttach(const int index A_UNUSED,
- const int amount A_UNUSED)
+ const int amount A_UNUSED) const
{
}
-void MailHandler::setAttachMoney(const int money A_UNUSED)
+void MailHandler::setAttachMoney(const int money A_UNUSED) const
{
}
-void MailHandler::resetAttach(const int flag A_UNUSED)
+void MailHandler::resetAttach(const int flag A_UNUSED) const
{
}
void MailHandler::send(const std::string &name A_UNUSED,
const std::string &title A_UNUSED,
- std::string message A_UNUSED)
+ std::string message A_UNUSED) const
{
}
diff --git a/src/net/tmwa/mailhandler.h b/src/net/tmwa/mailhandler.h
index f54901f50..b6427c763 100644
--- a/src/net/tmwa/mailhandler.h
+++ b/src/net/tmwa/mailhandler.h
@@ -39,25 +39,25 @@ class MailHandler final : public MessageHandler, public Net::MailHandler
void handleMessage(Net::MessageIn &msg) override final;
- void refresh() override final;
+ void refresh() const override final;
- void readMessage(const int msgId) override final;
+ void readMessage(const int msgId) const override final;
- void getAttach(const int msgId) override final;
+ void getAttach(const int msgId) const override final;
- void deleteMessage(const int msgId) override final;
+ void deleteMessage(const int msgId) const override final;
- void returnMessage(const int msgId) override final;
+ void returnMessage(const int msgId) const override final;
- void setAttach(const int index, const int amount) override final;
+ void setAttach(const int index, const int amount) const override final;
- void setAttachMoney(const int money) override final;
+ void setAttachMoney(const int money) const override final;
- void resetAttach(const int flag) override final;
+ void resetAttach(const int flag) const override final;
void send(const std::string &name,
const std::string &title,
- std::string message) override final;
+ std::string message) const override final;
};
} // namespace TmwAthena
diff --git a/src/statuseffect.h b/src/statuseffect.h
index bd7da5f8d..1e20953bc 100644
--- a/src/statuseffect.h
+++ b/src/statuseffect.h
@@ -104,7 +104,8 @@ class StatusEffect final
* the deactivating effect (false).
*/
static StatusEffect *getStunEffect(const int index,
- const Enable enabling) A_WARN_UNUSED;
+ const Enable enabling)
+ A_WARN_UNUSED;
/**
* Maps a block effect index to its corresponding effect index. Block