summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-29 22:38:01 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-29 22:38:01 +0300
commit1fe9a9f2002dc2d04bb52ec79ffa8c198e8f6c06 (patch)
tree2d7a5f379c70b16d12782f75568dab59de764551
parenteac67bd477047c2da9a2aeabadd93554cccf0ed8 (diff)
downloadmanaplus-1fe9a9f2002dc2d04bb52ec79ffa8c198e8f6c06.tar.gz
manaplus-1fe9a9f2002dc2d04bb52ec79ffa8c198e8f6c06.tar.bz2
manaplus-1fe9a9f2002dc2d04bb52ec79ffa8c198e8f6c06.tar.xz
manaplus-1fe9a9f2002dc2d04bb52ec79ffa8c198e8f6c06.zip
Fix code style.
-rw-r--r--src/being/castingeffect.h1
-rw-r--r--src/being/localplayer.h1
-rw-r--r--src/gui/widgets/attrs/attrdisplay.h1
-rw-r--r--src/gui/widgets/attrs/changedisplay.h1
-rw-r--r--src/gui/widgets/browserbox.cpp4
-rw-r--r--src/gui/widgets/statspagebasic.cpp1
-rw-r--r--src/gui/windows/killstats.cpp3
-rw-r--r--src/gui/windows/skilldialog.h1
-rw-r--r--src/gui/windows/statuswindow.cpp2
-rw-r--r--src/gui/windows/statuswindow.h3
-rw-r--r--src/net/eathena/beingrecv.cpp31
-rw-r--r--src/net/eathena/itemrecv.cpp4
-rw-r--r--src/utils/xml/libxml.cpp1
-rw-r--r--src/utils/xml/pugixml.cpp1
14 files changed, 28 insertions, 27 deletions
diff --git a/src/being/castingeffect.h b/src/being/castingeffect.h
index fceccc10c..6a2b4bf1a 100644
--- a/src/being/castingeffect.h
+++ b/src/being/castingeffect.h
@@ -28,7 +28,6 @@
#include "localconsts.h"
class AnimatedSprite;
-class Map;
class CastingEffect final : public Actor
{
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index cfbdf4285..e48730f6b 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -534,7 +534,6 @@ class LocalPlayer final : public Being,
bool mShowNavigePath;
bool mAllowRename;
bool mFreezed;
- bool mAllowNextStep;
};
extern LocalPlayer *localPlayer;
diff --git a/src/gui/widgets/attrs/attrdisplay.h b/src/gui/widgets/attrs/attrdisplay.h
index 7659ff0cd..3eb7fc089 100644
--- a/src/gui/widgets/attrs/attrdisplay.h
+++ b/src/gui/widgets/attrs/attrdisplay.h
@@ -31,7 +31,6 @@
#include "localconsts.h"
-class AttrDisplay;
class LayoutHelper;
class AttrDisplay notfinal : public Container
diff --git a/src/gui/widgets/attrs/changedisplay.h b/src/gui/widgets/attrs/changedisplay.h
index 92e5cb203..ad327bd2c 100644
--- a/src/gui/widgets/attrs/changedisplay.h
+++ b/src/gui/widgets/attrs/changedisplay.h
@@ -30,7 +30,6 @@
#include "localconsts.h"
class Button;
-class LayoutHelper;
class ChangeDisplay final : public AttrDisplay,
public ActionListener
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index d03f1d623..a6d83f4d5 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -27,6 +27,8 @@
#include "main.h"
#include "settings.h"
+#include "const/resources/item/cards.h"
+
#include "input/inputmanager.h"
#include "gui/gui.h"
@@ -45,8 +47,6 @@
#include "resources/image/image.h"
-#include "resources/item/cardslist.h"
-
#include "resources/loaders/imageloader.h"
#include "resources/loaders/imagesetloader.h"
diff --git a/src/gui/widgets/statspagebasic.cpp b/src/gui/widgets/statspagebasic.cpp
index c73837582..1e2ff3cac 100644
--- a/src/gui/widgets/statspagebasic.cpp
+++ b/src/gui/widgets/statspagebasic.cpp
@@ -37,6 +37,7 @@
StatsPageBasic::StatsPageBasic(const Widget2 *const widget) :
Container(widget),
WidgetListener(),
+ AttributeListener(),
StatListener(),
mAttrs(),
mAttrCont(new VertContainer(this, 32)),
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp
index f3ebbdaa4..dfc3c616e 100644
--- a/src/gui/windows/killstats.cpp
+++ b/src/gui/windows/killstats.cpp
@@ -201,7 +201,8 @@ void KillStats::resetTimes()
void KillStats::gainXp(int xp)
{
- const int expNeed = PlayerInfo::getAttribute(Attributes::PLAYER_EXP_NEEDED);
+ const int expNeed = PlayerInfo::getAttribute(
+ Attributes::PLAYER_EXP_NEEDED);
if (xp == expNeed)
xp = 0;
else if (!xp)
diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h
index c322c6c0a..5e53c7362 100644
--- a/src/gui/windows/skilldialog.h
+++ b/src/gui/windows/skilldialog.h
@@ -35,7 +35,6 @@
#include "utils/xml.h"
-class Being;
class Button;
class Label;
class SkillModel;
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index b6a6e9ceb..16e00fed7 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -37,7 +37,7 @@
#include "gui/widgets/button.h"
#include "gui/widgets/createwidget.h"
-#include "gui/widgets/layouthelper.h"
+#include "gui/widgets/layout.h"
#include "gui/widgets/layouttype.h"
#include "gui/widgets/progressbar.h"
#include "gui/widgets/statspage.h"
diff --git a/src/gui/windows/statuswindow.h b/src/gui/windows/statuswindow.h
index ce9685689..414e9a265 100644
--- a/src/gui/windows/statuswindow.h
+++ b/src/gui/windows/statuswindow.h
@@ -29,15 +29,12 @@
#include "listeners/attributelistener.h"
#include "listeners/statlistener.h"
-class AttrDisplay;
class Button;
class Label;
class ProgressBar;
-class ScrollArea;
class StatsPage;
class StatsPageBasic;
class TabbedArea;
-class VertContainer;
/**
* The player status dialog.
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index b918ae108..426003c7f 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -980,15 +980,17 @@ void BeingRecv::processSkillCastingContinue(Net::MessageIn &msg,
{ // being to being
Being *const dstBeing = actorManager->findBeing(dstId);
if (srcBeing)
- srcBeing->handleSkillCasting(dstBeing, skillId, skillLevel);
- if (dstBeing)
{
- srcBeing->addCast(dstBeing->getTileX(),
- dstBeing->getTileY(),
- skillId,
- skillLevel,
- range,
- castTime / MILLISECONDS_IN_A_TICK);
+ srcBeing->handleSkillCasting(dstBeing, skillId, skillLevel);
+ if (dstBeing)
+ {
+ srcBeing->addCast(dstBeing->getTileX(),
+ dstBeing->getTileY(),
+ skillId,
+ skillLevel,
+ range,
+ castTime / MILLISECONDS_IN_A_TICK);
+ }
}
}
else if (dstX != 0 || dstY != 0)
@@ -999,11 +1001,14 @@ void BeingRecv::processSkillCastingContinue(Net::MessageIn &msg,
skillLevel,
dstX, dstY,
castTime);
- srcBeing->addCast(dstX, dstY,
- skillId,
- skillLevel,
- range,
- castTime / MILLISECONDS_IN_A_TICK);
+ if (srcBeing)
+ {
+ srcBeing->addCast(dstX, dstY,
+ skillId,
+ skillLevel,
+ range,
+ castTime / MILLISECONDS_IN_A_TICK);
+ }
}
if (srcBeing == localPlayer &&
(inf2 & SkillType2::FreeCastAny) == 0)
diff --git a/src/net/eathena/itemrecv.cpp b/src/net/eathena/itemrecv.cpp
index eea55f340..321109290 100644
--- a/src/net/eathena/itemrecv.cpp
+++ b/src/net/eathena/itemrecv.cpp
@@ -26,9 +26,9 @@
#include "itemcolormanager.h"
#include "logger.h"
-#include "net/messagein.h"
+#include "const/resources/item/cards.h"
-#include "resources/item/cardslist.h"
+#include "net/messagein.h"
#include "debug.h"
diff --git a/src/utils/xml/libxml.cpp b/src/utils/xml/libxml.cpp
index ad4a73ddf..21a24fc67 100644
--- a/src/utils/xml/libxml.cpp
+++ b/src/utils/xml/libxml.cpp
@@ -82,6 +82,7 @@ namespace XML
Document::Document(const std::string &filename,
const UseResman useResman,
const SkipError skipError) :
+ Resource(),
mDoc(nullptr),
mIsValid(false)
{
diff --git a/src/utils/xml/pugixml.cpp b/src/utils/xml/pugixml.cpp
index d8795dd72..db47ae588 100644
--- a/src/utils/xml/pugixml.cpp
+++ b/src/utils/xml/pugixml.cpp
@@ -57,6 +57,7 @@ namespace XML
Document::Document(const std::string &filename,
const UseResman useResman,
const SkipError skipError) :
+ Resource(),
mDoc(),
mData(nullptr),
mIsValid(false)