summaryrefslogtreecommitdiff
path: root/src/localplayer.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
commit5afe88df2538274859a162ffd63ed52118e80c19 (patch)
treeb610dfd58dc748fd63f49565b2a43eea2316714f /src/localplayer.h
parent73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff)
downloadmana-5afe88df2538274859a162ffd63ed52118e80c19.tar.gz
mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.bz2
mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.xz
mana-5afe88df2538274859a162ffd63ed52118e80c19.zip
Apply C++11 fixits
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
Diffstat (limited to 'src/localplayer.h')
-rw-r--r--src/localplayer.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/localplayer.h b/src/localplayer.h
index 0d7b6077..7a9020d6 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -41,7 +41,7 @@ class OkDialog;
class AwayListener : public gcn::ActionListener
{
public:
- void action(const gcn::ActionEvent &event);
+ void action(const gcn::ActionEvent &event) override;
};
/**
@@ -66,11 +66,11 @@ class LocalPlayer : public Being
public:
LocalPlayer(int id= 65535, int subtype = 0);
- ~LocalPlayer();
+ ~LocalPlayer() override;
- virtual void logic();
+ void logic() override;
- virtual void setAction(Action action, int attackId = 1);
+ void setAction(Action action, int attackId = 1) override;
/**
* Check the player has permission to invite users to specific guild
@@ -95,7 +95,7 @@ class LocalPlayer : public Being
int getAttackRange() const
{ return mAttackRange; }
- void attack(Being *target = NULL, bool keep = false);
+ void attack(Being *target = nullptr, bool keep = false);
void setGMLevel(int level);
@@ -197,7 +197,7 @@ class LocalPlayer : public Being
void addMessageToQueue(const std::string &message,
int color = UserPalette::EXP_INFO);
- void event(Event::Channel channel, const Event &event);
+ void event(Event::Channel channel, const Event &event) override;
/**
* Tells the engine wether to check
@@ -252,7 +252,7 @@ class LocalPlayer : public Being
int mWalkingDir; /**< The direction the player is walking in. */
bool mPathSetByMouse; /**< Tells if the path was set using mouse */
- typedef std::pair<std::string, int> MessagePair;
+ using MessagePair = std::pair<std::string, int>;
/** Queued messages*/
std::list<MessagePair> mMessages;
int mMessageTime;