summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-17 22:00:34 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-17 22:26:06 +0300
commitef9e8793c77683b46a99daf6a57ca05facc44752 (patch)
treef152deaa1614295a3a318efada58b0b81723abaa /src
parent55480eb4477b2cf85af1bcdcc5e8ec4f4ce6682d (diff)
downloadmanaverse-ef9e8793c77683b46a99daf6a57ca05facc44752.tar.gz
manaverse-ef9e8793c77683b46a99daf6a57ca05facc44752.tar.bz2
manaverse-ef9e8793c77683b46a99daf6a57ca05facc44752.tar.xz
manaverse-ef9e8793c77683b46a99daf6a57ca05facc44752.zip
Fix code style.
Diffstat (limited to 'src')
-rw-r--r--src/being/being.h8
-rw-r--r--src/being/localplayer.cpp2
-rw-r--r--src/client.cpp3
-rw-r--r--src/configuration.h3
-rw-r--r--src/gui/models/updatelistmodel.h4
-rw-r--r--src/gui/palette.cpp4
-rw-r--r--src/gui/windows/questswindow.cpp2
-rw-r--r--src/localconsts.h2
-rw-r--r--src/net/eathena/beingrecv.cpp2
-rw-r--r--src/net/eathena/traderecv.h1
-rw-r--r--src/particle/imageparticle.h7
-rw-r--r--src/particle/particle.h8
-rw-r--r--src/units.cpp4
13 files changed, 24 insertions, 26 deletions
diff --git a/src/being/being.h b/src/being/being.h
index 4b8a03152..b0c1c26ea 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -526,10 +526,10 @@ class Being notfinal : public ActorSprite,
const int posY) const
restrict2 A_NONNULL(2);
- virtual void drawSpritesSDL(Graphics *restrict const graphics,
- const int posX,
- const int posY) const
- restrict2 final A_NONNULL(2);
+ void drawSpritesSDL(Graphics *restrict const graphics,
+ const int posX,
+ const int posY) const
+ restrict2 final A_NONNULL(2);
void drawHpBar(Graphics *restrict const graphics,
const int maxHP,
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 564e17cb9..33cf120d2 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -1040,7 +1040,7 @@ void LocalPlayer::handleStatusEffect(const StatusEffect *const effect,
}
if (!found)
- { // add new
+ { // add new
const int offset = CAST_S32(mStatusEffectIcons.size());
if (miniStatusWindow)
miniStatusWindow->setIcon(offset, sprite);
diff --git a/src/client.cpp b/src/client.cpp
index 2a50d41f0..3007f6127 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -523,10 +523,7 @@ void Client::initSoundManager()
try
{
if (config.getBoolValue("sound"))
- {
- //soundManager.testAudio();
soundManager.init();
- }
soundManager.setSfxVolume(config.getIntValue("sfxVolume"));
soundManager.setMusicVolume(config.getIntValue("musicVolume"));
diff --git a/src/configuration.h b/src/configuration.h
index b4320cec9..a9d5fdb21 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -150,8 +150,7 @@ class ConfigurationObject notfinal
ConfigurationObject *const wrobj
= manager->writeConfigItem(*it, nextobj);
if (wrobj)
- { // wrote something
-// assert (wrobj == nextobj);
+ { // wrote something
nextobj = new ConfigurationObject;
list->push_back(wrobj);
}
diff --git a/src/gui/models/updatelistmodel.h b/src/gui/models/updatelistmodel.h
index bddc7c2a2..37d5a8d12 100644
--- a/src/gui/models/updatelistmodel.h
+++ b/src/gui/models/updatelistmodel.h
@@ -39,7 +39,9 @@ class UpdateListModel final : public ListModel
mNames(),
mServer(server)
{
- FOR_EACH(std::vector<HostsGroup>::const_iterator, it, server->updateHosts)
+ FOR_EACH(std::vector<HostsGroup>::const_iterator,
+ it,
+ server->updateHosts)
{
const HostsGroup &group = *it;
mNames.push_back(group.name);
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp
index 0e3f9560c..cedfb0f86 100644
--- a/src/gui/palette.cpp
+++ b/src/gui/palette.cpp
@@ -132,7 +132,7 @@ void Palette::advanceGradient()
else if (grad == GradientType::SPECTRUM)
{
if (colIndex % 2)
- { // falling curve
+ { // falling curve
if (delay)
{
colVal = CAST_S32(255.0 *
@@ -145,7 +145,7 @@ void Palette::advanceGradient()
}
}
else
- { // ascending curve
+ { // ascending curve
if (delay)
{
colVal = CAST_S32(255.0 * (cos(M_PI *
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index 080c0bdd2..eed82636b 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -563,7 +563,7 @@ void QuestsWindow::updateEffects()
{ // in new list exists effect for this npc
const QuestEffect *const newEffect = (*itNew).second;
if (effect != newEffect)
- { // new effects is not equal to old effect
+ { // new effects is not equal to old effect
addEffects[id] = newEffect->effectId;
removeEffects.insert(id);
}
diff --git a/src/localconsts.h b/src/localconsts.h
index 4a79f61b0..f5254c641 100644
--- a/src/localconsts.h
+++ b/src/localconsts.h
@@ -100,7 +100,7 @@
#else // __native_client__
#ifdef __clang__
// because restrict broken in clang, now it removed from all places.
-//#define restrict __restrict__
+// #define restrict __restrict__
#define restrict
#define restrict2
#else // __clang__
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index c1dcdbd83..58197bf03 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -96,7 +96,7 @@ void BeingRecv::processBeingChangeLookCards(Net::MessageIn &msg)
int cards[maxCards];
if (!actorManager)
- { // here can be look from char server
+ { // here can be look from char server
if (!serverFeatures->haveAdvancedSprites())
return;
Net::Characters &chars = Net::CharServerHandler::mCharacters;
diff --git a/src/net/eathena/traderecv.h b/src/net/eathena/traderecv.h
index 39e8327bc..5f8c63ba2 100644
--- a/src/net/eathena/traderecv.h
+++ b/src/net/eathena/traderecv.h
@@ -41,6 +41,7 @@ namespace EAthena
void processTradeItemAdd(Net::MessageIn &msg);
void processTradeItemAddResponse(Net::MessageIn &msg);
} // namespace TradeRecv
+
} // namespace EAthena
#endif // NET_EATHENA_TRADERECV_H
diff --git a/src/particle/imageparticle.h b/src/particle/imageparticle.h
index fab5dd4b5..04395d870 100644
--- a/src/particle/imageparticle.h
+++ b/src/particle/imageparticle.h
@@ -48,10 +48,9 @@ class ImageParticle notfinal : public Particle
/**
* Draws the particle image
*/
- virtual void draw(Graphics *restrict const graphics,
- const int offsetX,
- const int offsetY) const
- restrict2 final A_NONNULL(2);
+ void draw(Graphics *restrict const graphics,
+ const int offsetX,
+ const int offsetY) const restrict2 final A_NONNULL(2);
void setAlpha(const float alpha) restrict2 final
{ mAlpha = alpha; }
diff --git a/src/particle/particle.h b/src/particle/particle.h
index 510fe5b6a..fe268a088 100644
--- a/src/particle/particle.h
+++ b/src/particle/particle.h
@@ -67,10 +67,10 @@ class Particle notfinal : public Actor
/**
* Draws the particle image.
*/
- virtual void draw(Graphics *restrict const graphics,
- const int offsetX,
- const int offsetY) const restrict2 override
- A_CONST A_NONNULL(2);
+ void draw(Graphics *restrict const graphics,
+ const int offsetX,
+ const int offsetY) const restrict2 override
+ A_CONST A_NONNULL(2);
/**
* Necessary for sorting with the other sprites.
diff --git a/src/units.cpp b/src/units.cpp
index 6fa0a963a..57cc3aa6e 100644
--- a/src/units.cpp
+++ b/src/units.cpp
@@ -61,7 +61,7 @@ struct UnitDescription units[UNIT_END];
void Units::loadUnits()
{
- { // Setup default weight
+ { // Setup default weight
UnitDescription ud;
ud.conversion = 1.0;
@@ -88,7 +88,7 @@ void Units::loadUnits()
units[UNIT_WEIGHT] = ud;
}
- { // Setup default currency
+ { // Setup default currency
UnitDescription ud;
ud.conversion = 1.0;