summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-14 11:27:04 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-14 12:34:23 +0300
commita7d7346b9eb3fa62a8912e31d5c00f8e05390425 (patch)
treeba2d006e8aaac74138eb13ba458d30abf8f01182 /src
parent9569f124d176b4220f28f9a41812c33883737228 (diff)
downloadmv-a7d7346b9eb3fa62a8912e31d5c00f8e05390425.tar.gz
mv-a7d7346b9eb3fa62a8912e31d5c00f8e05390425.tar.bz2
mv-a7d7346b9eb3fa62a8912e31d5c00f8e05390425.tar.xz
mv-a7d7346b9eb3fa62a8912e31d5c00f8e05390425.zip
some more style fixes from cpplint.
Diffstat (limited to 'src')
-rw-r--r--src/actorsprite.cpp10
-rw-r--r--src/actorspritemanager.cpp4
-rw-r--r--src/animatedsprite.cpp2
-rw-r--r--src/animationparticle.cpp2
-rw-r--r--src/being.cpp1
-rw-r--r--src/client.cpp2
-rw-r--r--src/compoundsprite.cpp3
-rw-r--r--src/debug/debug_new.cpp18
-rw-r--r--src/game.cpp8
-rw-r--r--src/graphics.cpp16
-rw-r--r--src/graphicsmanager.cpp4
-rw-r--r--src/gui/shopwindow.cpp14
-rw-r--r--src/gui/widgets/itemlinkhandler.cpp2
-rw-r--r--src/guichan/actionevent.cpp4
-rw-r--r--src/guichan/basiccontainer.cpp2
-rw-r--r--src/guichan/cliprectangle.cpp2
-rw-r--r--src/guichan/color.cpp8
-rw-r--r--src/guichan/event.cpp4
-rw-r--r--src/guichan/exception.cpp5
-rw-r--r--src/guichan/focushandler.cpp2
-rw-r--r--src/guichan/font.cpp2
-rw-r--r--src/guichan/graphics.cpp5
-rw-r--r--src/guichan/gui.cpp10
-rw-r--r--src/guichan/inputevent.cpp3
-rw-r--r--src/guichan/key.cpp2
-rw-r--r--src/guichan/keyevent.cpp4
-rw-r--r--src/guichan/keyinput.cpp3
-rw-r--r--src/guichan/mouseevent.cpp2
-rw-r--r--src/guichan/rectangle.cpp2
-rw-r--r--src/guichan/sdl/sdlgraphics.cpp6
-rw-r--r--src/guichan/selectionevent.cpp4
-rw-r--r--src/guichan/widget.cpp12
-rw-r--r--src/guichan/widgets/button.cpp2
-rw-r--r--src/guichan/widgets/checkbox.cpp2
-rw-r--r--src/guichan/widgets/container.cpp3
-rw-r--r--src/guichan/widgets/label.cpp2
-rw-r--r--src/guichan/widgets/listbox.cpp4
-rw-r--r--src/guichan/widgets/radiobutton.cpp2
-rw-r--r--src/guichan/widgets/scrollarea.cpp13
-rw-r--r--src/guichan/widgets/slider.cpp2
-rw-r--r--src/guichan/widgets/textbox.cpp5
-rw-r--r--src/guichan/widgets/textfield.cpp2
-rw-r--r--src/guichan/widgets/window.cpp2
-rw-r--r--src/localplayer.cpp53
-rw-r--r--src/map.cpp5
-rw-r--r--src/mobileopenglgraphics.cpp18
-rw-r--r--src/mumblemanager.cpp2
-rw-r--r--src/navigationmanager.cpp2
-rw-r--r--src/net/ea/adminhandler.h2
-rw-r--r--src/net/ea/beinghandler.cpp4
-rw-r--r--src/net/ea/beinghandler.h2
-rw-r--r--src/net/ea/buysellhandler.h2
-rw-r--r--src/net/ea/charserverhandler.h2
-rw-r--r--src/net/ea/chathandler.h2
-rw-r--r--src/net/ea/gamehandler.h2
-rw-r--r--src/net/ea/gui/guildtab.h4
-rw-r--r--src/net/ea/gui/partytab.h4
-rw-r--r--src/net/ea/guildhandler.cpp22
-rw-r--r--src/net/ea/inventoryhandler.h2
-rw-r--r--src/net/ea/itemhandler.h2
-rw-r--r--src/net/ea/loginhandler.h2
-rw-r--r--src/net/ea/network.h2
-rw-r--r--src/net/ea/npchandler.h2
-rw-r--r--src/net/ea/partyhandler.cpp16
-rw-r--r--src/net/ea/partyhandler.h2
-rw-r--r--src/net/ea/playerhandler.h2
-rw-r--r--src/net/ea/skillhandler.h2
-rw-r--r--src/net/ea/tradehandler.cpp2
-rw-r--r--src/net/ea/tradehandler.h2
-rw-r--r--src/net/eathena/adminhandler.h2
-rw-r--r--src/net/eathena/beinghandler.cpp3
-rw-r--r--src/net/eathena/beinghandler.h4
-rw-r--r--src/net/eathena/buysellhandler.h4
-rw-r--r--src/net/eathena/charserverhandler.h4
-rw-r--r--src/net/eathena/chathandler.h2
-rw-r--r--src/net/eathena/gamehandler.cpp2
-rw-r--r--src/net/eathena/gamehandler.h4
-rw-r--r--src/net/eathena/generalhandler.h4
-rw-r--r--src/net/eathena/gui/guildtab.h4
-rw-r--r--src/net/eathena/gui/partytab.h4
-rw-r--r--src/net/eathena/guildhandler.cpp8
-rw-r--r--src/net/eathena/inventoryhandler.h2
-rw-r--r--src/net/eathena/itemhandler.h4
-rw-r--r--src/net/eathena/loginhandler.h4
-rw-r--r--src/net/eathena/network.cpp2
-rw-r--r--src/net/eathena/network.h4
-rw-r--r--src/net/eathena/npchandler.h4
-rw-r--r--src/net/eathena/partyhandler.h2
-rw-r--r--src/net/eathena/playerhandler.h4
-rw-r--r--src/net/eathena/skillhandler.h4
-rw-r--r--src/net/eathena/tradehandler.h2
-rw-r--r--src/net/tmwa/adminhandler.h2
-rw-r--r--src/net/tmwa/beinghandler.cpp4
-rw-r--r--src/net/tmwa/beinghandler.h2
-rw-r--r--src/net/tmwa/buysellhandler.h2
-rw-r--r--src/net/tmwa/charserverhandler.h2
-rw-r--r--src/net/tmwa/chathandler.h2
-rw-r--r--src/net/tmwa/gamehandler.h2
-rw-r--r--src/net/tmwa/generalhandler.h2
-rw-r--r--src/net/tmwa/gui/guildtab.h4
-rw-r--r--src/net/tmwa/gui/partytab.h4
-rw-r--r--src/net/tmwa/inventoryhandler.h2
-rw-r--r--src/net/tmwa/itemhandler.h2
-rw-r--r--src/net/tmwa/loginhandler.h2
-rw-r--r--src/net/tmwa/network.cpp2
-rw-r--r--src/net/tmwa/network.h2
-rw-r--r--src/net/tmwa/npchandler.h2
-rw-r--r--src/net/tmwa/partyhandler.h2
-rw-r--r--src/net/tmwa/playerhandler.h2
-rw-r--r--src/net/tmwa/questhandler.h2
-rw-r--r--src/net/tmwa/skillhandler.h2
-rw-r--r--src/net/tmwa/tradehandler.h2
-rw-r--r--src/particle.cpp2
-rw-r--r--src/playerinfo.h2
-rw-r--r--src/resources/atlasmanager.cpp1
-rw-r--r--src/resources/beinginfo.cpp1
-rw-r--r--src/resources/chardb.cpp2
-rw-r--r--src/resources/cursor.cpp3
-rw-r--r--src/resources/dye.cpp1
-rw-r--r--src/resources/emotedb.cpp4
-rw-r--r--src/resources/iteminfo.cpp2
-rw-r--r--src/resources/mapreader.cpp10
-rw-r--r--src/resources/monsterdb.cpp4
-rw-r--r--src/resources/npcdb.cpp2
-rw-r--r--src/resources/openglimagehelper.cpp2
-rw-r--r--src/resources/resourcemanager.cpp7
-rw-r--r--src/resources/sdlimagehelper.cpp2
-rw-r--r--src/resources/spritedef.cpp3
-rw-r--r--src/resources/wallpaper.cpp4
-rw-r--r--src/safeopenglgraphics.cpp5
-rw-r--r--src/spellshortcut.cpp1
-rw-r--r--src/statuseffect.cpp4
-rw-r--r--src/utils/copynpaste.cpp3
133 files changed, 250 insertions, 309 deletions
diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp
index 60857a5af..930289c74 100644
--- a/src/actorsprite.cpp
+++ b/src/actorsprite.cpp
@@ -142,7 +142,7 @@ void ActorSprite::setMap(Map *const map)
// Clear particle effect list because child particles became invalid
mChildParticleEffects.clear();
- mMustResetParticles = true; // Reset status particles on next redraw
+ mMustResetParticles = true; // Reset status particles on next redraw
}
void ActorSprite::controlParticle(Particle *const particle)
@@ -208,12 +208,6 @@ void ActorSprite::handleStatusEffect(StatusEffect *const effect,
if (!effect)
return;
- // TODO: Find out how this is meant to be used
- // (SpriteAction != Being::Action)
- //SpriteAction action = effect->getAction();
- //if (action != ACTION_INVALID)
- // setAction(action);
-
Particle *const particle = effect->getParticle();
if (effectId >= 0)
@@ -286,7 +280,7 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
mChildParticleEffects.clear();
- //setup particle effects
+ // setup particle effects
if (Particle::enabled && particleEngine)
{
FOR_EACH (StringVectCIter, itr, display.particles)
diff --git a/src/actorspritemanager.cpp b/src/actorspritemanager.cpp
index 09dc1ff8e..6de1e0396 100644
--- a/src/actorspritemanager.cpp
+++ b/src/actorspritemanager.cpp
@@ -358,7 +358,6 @@ Being *ActorSpriteManager::findBeingByPixel(const int x, const int y,
|| (targetDead && being->getType() == Being::PLAYER))
&& (allPlayers || being != player_node))
{
-
if ((being->getPixelX() - 16 <= x) &&
(being->getPixelX() + 16 > x) &&
(being->getPixelY() - 32 <= y) &&
@@ -446,7 +445,6 @@ void ActorSpriteManager::findBeingsByPixel(std::vector<ActorSprite*> &beings,
&& (allPlayers || being != player_node))
|| actor->getType() == ActorSprite::FLOOR_ITEM)
{
-
if ((actor->getPixelX() - xtol <= x) &&
(actor->getPixelX() + xtol > x) &&
(actor->getPixelY() - uptol <= y) &&
@@ -1030,8 +1028,6 @@ Being *ActorSpriteManager::findNearestLivingBeing(const Being *const
const bool valid = validateBeing(aroundBeing, being,
type, excluded, 50);
int d = being->getDistance();
-// logger->log("dist: %d", dist);
-// logger->log("name: %s, %d, %d", being->getName().c_str(), (int)valid, d);
if (being->getType() != Being::MONSTER || !mTargetOnlyReachable)
{ // if distance not calculated, use old distance
d = (being->getTileX() - x) * (being->getTileX() - x)
diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp
index d60107b15..d802f9b9a 100644
--- a/src/animatedsprite.cpp
+++ b/src/animatedsprite.cpp
@@ -407,7 +407,7 @@ void AnimatedSprite::setDelayLoad(const std::string &filename,
delete mDelayLoad;
}
mDelayLoad = new AnimationDelayLoad(filename, variant, this);
- ResourceManager::addDelayedAnimation(mDelayLoad);
+ ResourceManager::addDelayedAnimation(mDelayLoad);
}
void AnimatedSprite::clearDelayLoad()
diff --git a/src/animationparticle.cpp b/src/animationparticle.cpp
index 7172f4864..7a60730de 100644
--- a/src/animationparticle.cpp
+++ b/src/animationparticle.cpp
@@ -53,7 +53,7 @@ bool AnimationParticle::update()
{
if (mAnimation)
{
- mAnimation->update(10); // particle engine is updated every 10ms
+ mAnimation->update(10); // particle engine is updated every 10ms
mImage = mAnimation->getCurrentImage();
}
return Particle::update();
diff --git a/src/being.cpp b/src/being.cpp
index c37550638..4f1016b79 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -2458,7 +2458,6 @@ void Being::recalcSpritesOrder()
}
itemSlotRemap[id] = -info.mDrawBefore[dir];
-// logger->log("item slot->slot %d %d->%d", id, slot, itemSlotRemap[id]);
}
else if (info.mDrawAfter[dir] > 0)
{
diff --git a/src/client.cpp b/src/client.cpp
index af12ea50c..08fd2ab27 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1678,7 +1678,7 @@ int Client::gameExec()
break;
case STATE_AUTORECONNECT_SERVER:
- //++++++
+ // ++++++
break;
case STATE_START:
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp
index 24fc7bbdb..9d5e057b2 100644
--- a/src/compoundsprite.cpp
+++ b/src/compoundsprite.cpp
@@ -113,7 +113,7 @@ bool CompoundSprite::draw(Graphics *const graphics,
if (mNeedsRedraw)
updateImages();
- if (mSprites.empty()) // Nothing to draw
+ if (mSprites.empty()) // Nothing to draw
return false;
if (mAlpha == 1.0f && mImage)
@@ -310,7 +310,6 @@ unsigned int CompoundSprite::getFrameCount(unsigned int layer)
void CompoundSprite::redraw() const
{
-
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
const int rmask = 0xff000000;
const int gmask = 0x00ff0000;
diff --git a/src/debug/debug_new.cpp b/src/debug/debug_new.cpp
index e237fcbdf..bfbc56a4f 100644
--- a/src/debug/debug_new.cpp
+++ b/src/debug/debug_new.cpp
@@ -57,7 +57,7 @@
#include "localconsts.h"
-//define DUMP_MEM_ADDRESSES 1
+// #define DUMP_MEM_ADDRESSES 1
#if !_FAST_MUTEX_CHECK_INITIALIZATION && !defined(_NOTHREADS)
#error "_FAST_MUTEX_CHECK_INITIALIZATION not set: check_leaks may not work"
@@ -163,9 +163,9 @@
*
* Value of the padding bytes at the end of a memory block.
*/
-//#ifndef M_DEBUG_NEW_TAILCHECK_CHAR
-//#define M_DEBUG_NEW_TAILCHECK_CHAR 0xCC
-//#endif
+// #ifndef M_DEBUG_NEW_TAILCHECK_CHAR
+// #define M_DEBUG_NEW_TAILCHECK_CHAR 0xCC
+// #endif
/**
* @def M_DEBUG_NEW_USE_ADDR2LINE
@@ -399,7 +399,7 @@ static bool print_position_from_addr(const void*)
{
return false;
}
-#endif // M_DEBUG_NEW_USE_ADDR2LINE
+#endif // M_DEBUG_NEW_USE_ADDR2LINE
/**
* Prints the position information of a memory operation point. When \c
@@ -420,7 +420,7 @@ static void print_position(const void* ptr, int line)
}
else if (ptr != nullptr) // Is caller address present?
{
- if (!print_position_from_addr(ptr)) // Fail to get source position?
+ if (!print_position_from_addr(ptr)) // Fail to get source position?
fprintf(new_output_fp, "%p", ptr);
}
else // No information is present
@@ -778,13 +778,13 @@ void* operator new [](size_t size, const char* file, int line)
#endif
}
-void* operator new (size_t size) //throw(std::bad_alloc)
+void* operator new (size_t size) // throw(std::bad_alloc)
{
return operator new (size, static_cast<char*>(
M_DEBUG_NEW_CALLER_ADDRESS), 0);
}
-void* operator new [](size_t size) //throw(std::bad_alloc)
+void* operator new [](size_t size) // throw(std::bad_alloc)
{
return operator new [](size, static_cast<char*>(
M_DEBUG_NEW_CALLER_ADDRESS), 0);
@@ -854,7 +854,7 @@ void operator delete [](void* pointer, const std::nothrow_t&) throw()
operator delete [](pointer, static_cast<char*>(
M_DEBUG_NEW_CALLER_ADDRESS), 0);
}
-#endif // HAVE_PLACEMENT_DELETE
+#endif // HAVE_PLACEMENT_DELETE
int __debug_new_counter::_S_count = 0;
diff --git a/src/game.cpp b/src/game.cpp
index 105be45cf..9a6f3b006 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -331,7 +331,7 @@ static void destroyGuiWindows()
guildManager->clear();
del_0(windowMenu);
- del_0(localChatTab) // Need to do this first, so it can remove itself
+ del_0(localChatTab) // Need to do this first, so it can remove itself
del_0(debugChatTab)
del_0(tradeChatTab)
del_0(battleChatTab)
@@ -603,7 +603,7 @@ void Game::slowLogic()
if (!Net::getGameHandler()->isConnected())
{
if (Client::getState() == STATE_CHANGE_MAP)
- return; // Not a problem here
+ return; // Not a problem here
if (Client::getState() != STATE_ERROR)
{
@@ -956,7 +956,7 @@ void Game::handleInput()
switch (event.type)
{
case SDL_VIDEORESIZE:
- // Let the client deal with this one (it'll
+ // Let the client deal with this one (it'll
// pass down from there)
Client::resize(event.resize.w, event.resize.h);
break;
@@ -977,7 +977,7 @@ void Game::handleInput()
break;
}
BLOCK_END("Game::handleInput 2")
- } // End while
+ } // End while
// If the user is configuring the keys then don't respond.
if (!player_node || !keyboard.isEnabled() || player_node->getAway())
diff --git a/src/graphics.cpp b/src/graphics.cpp
index e220775a7..4e4f9273b 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -46,11 +46,7 @@
#ifdef USE_OPENGL
#ifndef GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX
-//#define GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX 0x9047
-//#define GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX 0x9048
#define GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX 0x9049
-//#define GPU_MEMORY_INFO_EVICTION_COUNT_NVX 0x904A
-//#define GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B
#endif
#endif
@@ -473,13 +469,13 @@ void Graphics::drawImagePattern(const Image *const image,
if (iw == 0 || ih == 0)
return;
- for (int py = 0; py < h; py += ih) // Y position on pattern plane
+ for (int py = 0; py < h; py += ih) // Y position on pattern plane
{
const int dh = (py + ih >= h) ? h - py : ih;
const int srcY = image->mBounds.y;
const int dstY = y + py + mClipStack.top().yOffset;
- for (int px = 0; px < w; px += iw) // X position on pattern plane
+ for (int px = 0; px < w; px += iw) // X position on pattern plane
{
const int dw = (px + iw >= w) ? w - px : iw;
const int srcX = image->mBounds.x;
@@ -525,13 +521,13 @@ void Graphics::drawRescaledImagePattern(const Image *const image,
if (iw == 0 || ih == 0)
return;
- for (int py = 0; py < h; py += ih) // Y position on pattern plane
+ for (int py = 0; py < h; py += ih) // Y position on pattern plane
{
const int dh = (py + ih >= h) ? h - py : ih;
const int srcY = tmpImage->mBounds.y;
const int dstY = y + py + mClipStack.top().yOffset;
- for (int px = 0; px < w; px += iw) // X position on pattern plane
+ for (int px = 0; px < w; px += iw) // X position on pattern plane
{
const int dw = (px + iw >= w) ? w - px : iw;
const int srcX = tmpImage->mBounds.x;
@@ -689,13 +685,13 @@ void Graphics::calcImagePattern(ImageVertexes* const vert,
if (iw == 0 || ih == 0)
return;
- for (int py = 0; py < h; py += ih) // Y position on pattern plane
+ for (int py = 0; py < h; py += ih) // Y position on pattern plane
{
const int dh = (py + ih >= h) ? h - py : ih;
const int srcY = image->mBounds.y;
const int dstY = y + py + mClipStack.top().yOffset;
- for (int px = 0; px < w; px += iw) // X position on pattern plane
+ for (int px = 0; px < w; px += iw) // X position on pattern plane
{
const int dw = (px + iw >= w) ? w - px : iw;
const int srcX = image->mBounds.x;
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp
index 935e9ca55..14069c0e6 100644
--- a/src/graphicsmanager.cpp
+++ b/src/graphicsmanager.cpp
@@ -419,7 +419,7 @@ void GraphicsManager::updatePlanformExtensions()
HDC hdc = GetDC(info.window);
if (hdc)
{
- const char *const extensions = mwglGetExtensionsString (hdc);
+ const char *const extensions = mwglGetExtensionsString(hdc);
if (extensions)
{
logger->log1("wGL extensions:");
@@ -966,7 +966,7 @@ static CALLBACK void debugCallback(GLenum source, GLenum type, GLuint id,
break;
}
char *const buf = new char[length + 1];
- memcpy (buf, text, length);
+ memcpy(buf, text, length);
buf[length] = 0;
message.append(" ").append(buf);
delete [] buf;
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp
index bc6ca117d..ea037b93b 100644
--- a/src/gui/shopwindow.cpp
+++ b/src/gui/shopwindow.cpp
@@ -250,7 +250,7 @@ void ShopWindow::action(const gcn::ActionEvent &event)
if (!inv)
return;
- //+++ need support for colors
+ // +++ need support for colors
Item *const item = inv->findItem(mSelectedItem, 0);
if (item)
{
@@ -377,7 +377,7 @@ void ShopWindow::loadList()
if (tokens.size() == 5 && tokens[0])
{
- //+++ need impliment colors?
+ // +++ need impliment colors?
if (tokens[1] && tokens[2] && mBuyShopItems)
{
mBuyShopItems->addItem(
@@ -556,7 +556,7 @@ void ShopWindow::giveList(const std::string &nick, const int mode)
if (mode == SELL)
{
- //+++ need support for colors
+ // +++ need support for colors
const Item *const item2 = inv->findItem(item->getId(), 0);
if (item2)
{
@@ -651,12 +651,12 @@ void ShopWindow::showList(const std::string &nick, std::string data) const
const int id = decodeStr(data.substr(f, 2));
const int price = decodeStr(data.substr(f + 2, 4));
int amount = decodeStr(data.substr(f + 6, 3));
- //+++ need impliment colors?
+ // +++ need impliment colors?
if (buyDialog && amount > 0)
buyDialog->addItem(id, 1, amount, price);
if (sellDialog)
{
- //+++ need support for colors
+ // +++ need support for colors
const Item *const item = inv->findItem(id, 0);
if (item)
{
@@ -723,12 +723,12 @@ void ShopWindow::processRequest(std::string nick, std::string data,
amount = atoi(part3.c_str());
delete mTradeItem;
- //+++ need impliment colors?
+ // +++ need impliment colors?
mTradeItem = new ShopItem(-1, id, 1, amount, price);
if (mode == BUY)
{
- //+++ need support for colors
+ // +++ need support for colors
const Item *const item2 = inv->findItem(mTradeItem->getId(), 0);
if (!item2 || item2->getQuantity() < amount
|| !findShopItem(mTradeItem, SELL))
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp
index 5a7eb3462..76a1aeaaf 100644
--- a/src/gui/widgets/itemlinkhandler.cpp
+++ b/src/gui/widgets/itemlinkhandler.cpp
@@ -114,7 +114,7 @@ void ItemLinkHandler::handleLink(const std::string &link,
if (id > 0)
{
const ItemInfo &itemInfo = ItemDB::get(id);
- //+++ need add color to links?
+ // +++ need add color to links?
mItemPopup->setItem(itemInfo, 1, true);
if (mItemPopup->isPopupVisible())
diff --git a/src/guichan/actionevent.cpp b/src/guichan/actionevent.cpp
index deda65d36..a2f80b19d 100644
--- a/src/guichan/actionevent.cpp
+++ b/src/guichan/actionevent.cpp
@@ -56,16 +56,14 @@ namespace gcn
:Event(source),
mId(id)
{
-
}
ActionEvent::~ActionEvent()
{
-
}
const std::string& ActionEvent::getId() const
{
return mId;
}
-}
+} // namespace gcn
diff --git a/src/guichan/basiccontainer.cpp b/src/guichan/basiccontainer.cpp
index 5defa924e..e15b924c7 100644
--- a/src/guichan/basiccontainer.cpp
+++ b/src/guichan/basiccontainer.cpp
@@ -370,4 +370,4 @@ namespace gcn
return nullptr;
}
-}
+} // namespace gcn
diff --git a/src/guichan/cliprectangle.cpp b/src/guichan/cliprectangle.cpp
index 5bff1ab81..bb5547211 100644
--- a/src/guichan/cliprectangle.cpp
+++ b/src/guichan/cliprectangle.cpp
@@ -85,4 +85,4 @@ namespace gcn
return *this;
}
-}
+} // namespace gcn
diff --git a/src/guichan/color.cpp b/src/guichan/color.cpp
index 29b4f2bdc..42e4a3f57 100644
--- a/src/guichan/color.cpp
+++ b/src/guichan/color.cpp
@@ -92,9 +92,9 @@ namespace gcn
Color Color::operator-(const Color& color) const
{
- Color result(r - color.r,
- g - color.g,
- b - color.b,
+ Color result(r - color.r,
+ g - color.g,
+ b - color.b,
255);
result.r = (result.r > 255 ? 255 : (result.r < 0 ? 0 : result.r));
@@ -143,4 +143,4 @@ namespace gcn
return out;
}
-}
+} // namespace gcn
diff --git a/src/guichan/event.cpp b/src/guichan/event.cpp
index f37bf2846..ecd309f87 100644
--- a/src/guichan/event.cpp
+++ b/src/guichan/event.cpp
@@ -55,16 +55,14 @@ namespace gcn
Event::Event(Widget *const source) :
mSource(source)
{
-
}
Event::~Event()
{
-
}
Widget* Event::getSource() const
{
return mSource;
}
-}
+} // namespace gcn
diff --git a/src/guichan/exception.cpp b/src/guichan/exception.cpp
index 0117aa2a6..b55ae6b0a 100644
--- a/src/guichan/exception.cpp
+++ b/src/guichan/exception.cpp
@@ -58,7 +58,6 @@ namespace gcn
mFilename("?"),
mLine(0)
{
-
}
Exception::Exception(const std::string& message)
@@ -67,7 +66,6 @@ namespace gcn
mFilename("?"),
mLine(0)
{
-
}
Exception::Exception(const std::string& message,
@@ -79,7 +77,6 @@ namespace gcn
mFilename(filename),
mLine(line)
{
-
}
const std::string& Exception::getFunction() const
@@ -101,4 +98,4 @@ namespace gcn
{
return mLine;
}
-}
+} // namespace gcn
diff --git a/src/guichan/focushandler.cpp b/src/guichan/focushandler.cpp
index 71e2d25ed..93d6ec9d4 100644
--- a/src/guichan/focushandler.cpp
+++ b/src/guichan/focushandler.cpp
@@ -548,4 +548,4 @@ namespace gcn
{
mLastWidgetPressed = lastWidgetPressed;
}
-}
+} // namespace gcn
diff --git a/src/guichan/font.cpp b/src/guichan/font.cpp
index fb8d2ae41..e04ce0e83 100644
--- a/src/guichan/font.cpp
+++ b/src/guichan/font.cpp
@@ -65,4 +65,4 @@ namespace gcn
return static_cast<int>(text.size());
}
-}
+} // namespace gcn
diff --git a/src/guichan/graphics.cpp b/src/guichan/graphics.cpp
index a17884e6f..201f5d300 100644
--- a/src/guichan/graphics.cpp
+++ b/src/guichan/graphics.cpp
@@ -84,7 +84,7 @@ namespace gcn
carea.xOffset = area.x;
carea.yOffset = area.y;
mClipStack.push(carea);
- return true;
+ return true;
}
const ClipRectangle &top = mClipStack.top();
@@ -127,7 +127,6 @@ namespace gcn
void Graphics::popClipArea()
{
-
if (mClipStack.empty())
throw GCN_EXCEPTION("Tried to pop clip area from empty stack.");
@@ -157,4 +156,4 @@ namespace gcn
{
}
*/
-}
+} // namespace gcn
diff --git a/src/guichan/gui.cpp b/src/guichan/gui.cpp
index a72b70f84..d91ac7ee0 100644
--- a/src/guichan/gui.cpp
+++ b/src/guichan/gui.cpp
@@ -479,7 +479,7 @@ namespace gcn
{
Widget *const widget = getWidgetAt(x, y);
- //+++ possible nullpointer
+ // +++ possible nullpointer
if (mFocusHandler->getModalMouseInputFocused()
&& !widget->isModalMouseInputFocused())
{
@@ -493,7 +493,7 @@ namespace gcn
{
Widget* widget = mFocusHandler->getFocused();
- //+++ possible nullpointer
+ // +++ possible nullpointer
while (widget->_getInternalFocusHandler()
&& widget->_getInternalFocusHandler()->getFocused())
{
@@ -716,7 +716,7 @@ namespace gcn
{
BLOCK_START("Gui::handleModalMouseInputFocus")
// Check if modal mouse input focus has been gained by a widget.
- if ((mFocusHandler->getLastWidgetWithModalMouseInputFocus()
+ if ((mFocusHandler->getLastWidgetWithModalMouseInputFocus()
!= mFocusHandler->getModalMouseInputFocused())
&& (!mFocusHandler->getLastWidgetWithModalMouseInputFocus()))
{
@@ -739,7 +739,7 @@ namespace gcn
{
BLOCK_START("Gui::handleModalFocus")
// Check if modal focus has been gained by a widget.
- if ((mFocusHandler->getLastWidgetWithModalFocus()
+ if ((mFocusHandler->getLastWidgetWithModalFocus()
!= mFocusHandler->getModalFocused())
&& (!mFocusHandler->getLastWidgetWithModalFocus()))
{
@@ -827,4 +827,4 @@ namespace gcn
parent = swap->getParent();
}
}
-}
+} // namespace gcn
diff --git a/src/guichan/inputevent.cpp b/src/guichan/inputevent.cpp
index 30c9ada15..844ef2cbd 100644
--- a/src/guichan/inputevent.cpp
+++ b/src/guichan/inputevent.cpp
@@ -64,7 +64,6 @@ namespace gcn
mMetaPressed(metaPressed),
mIsConsumed(false)
{
-
}
bool InputEvent::isShiftPressed() const
@@ -96,4 +95,4 @@ namespace gcn
{
return mIsConsumed;
}
-}
+} // namespace gcn
diff --git a/src/guichan/key.cpp b/src/guichan/key.cpp
index ccc3e27aa..e1e72c436 100644
--- a/src/guichan/key.cpp
+++ b/src/guichan/key.cpp
@@ -91,4 +91,4 @@ namespace gcn
{
return (mValue != key.mValue);
}
-}
+} // namespace gcn
diff --git a/src/guichan/keyevent.cpp b/src/guichan/keyevent.cpp
index f93dd670d..bfcc6dc9e 100644
--- a/src/guichan/keyevent.cpp
+++ b/src/guichan/keyevent.cpp
@@ -69,12 +69,10 @@ namespace gcn
mIsNumericPad(numericPad),
mKey(key)
{
-
}
KeyEvent::~KeyEvent()
{
-
}
unsigned int KeyEvent::getType() const
@@ -91,4 +89,4 @@ namespace gcn
{
return mKey;
}
-}
+} // namespace gcn
diff --git a/src/guichan/keyinput.cpp b/src/guichan/keyinput.cpp
index bf12ce418..906b6effe 100644
--- a/src/guichan/keyinput.cpp
+++ b/src/guichan/keyinput.cpp
@@ -61,7 +61,6 @@ namespace gcn
mMetaPressed(false),
mNumericPad(false)
{
-
}
void KeyInput::setType(unsigned int type)
@@ -133,4 +132,4 @@ namespace gcn
{
mNumericPad = numpad;
}
-}
+} // namespace gcn
diff --git a/src/guichan/mouseevent.cpp b/src/guichan/mouseevent.cpp
index 80ff0fcd8..352623d61 100644
--- a/src/guichan/mouseevent.cpp
+++ b/src/guichan/mouseevent.cpp
@@ -99,4 +99,4 @@ namespace gcn
{
return mType;
}
-}
+} // namespace gcn
diff --git a/src/guichan/rectangle.cpp b/src/guichan/rectangle.cpp
index 02e4f31c9..ce5b72bfe 100644
--- a/src/guichan/rectangle.cpp
+++ b/src/guichan/rectangle.cpp
@@ -134,4 +134,4 @@ namespace gcn
return out;
}
-}
+} // namespace gcn
diff --git a/src/guichan/sdl/sdlgraphics.cpp b/src/guichan/sdl/sdlgraphics.cpp
index a7b6c0e3c..9678f7a60 100644
--- a/src/guichan/sdl/sdlgraphics.cpp
+++ b/src/guichan/sdl/sdlgraphics.cpp
@@ -274,7 +274,7 @@ namespace gcn
}
default:
break;
- } // end switch
+ } // end switch
SDL_UnlockSurface(mTarget);
}
@@ -392,7 +392,7 @@ namespace gcn
default:
break;
- } // end switch
+ } // end switch
SDL_UnlockSurface(mTarget);
}
@@ -598,4 +598,4 @@ namespace gcn
SDL_BlitSurface(surface, &source, mTarget, &destination);
}
-}
+} // namespace gcn
diff --git a/src/guichan/selectionevent.cpp b/src/guichan/selectionevent.cpp
index 9d586bd53..eec84c5b0 100644
--- a/src/guichan/selectionevent.cpp
+++ b/src/guichan/selectionevent.cpp
@@ -55,11 +55,9 @@ namespace gcn
SelectionEvent::SelectionEvent(Widget *const source) :
Event(source)
{
-
}
SelectionEvent::~SelectionEvent()
{
-
}
-}
+} // namespace gcn
diff --git a/src/guichan/widget.cpp b/src/guichan/widget.cpp
index 00e3decf6..dcd64371e 100644
--- a/src/guichan/widget.cpp
+++ b/src/guichan/widget.cpp
@@ -177,7 +177,7 @@ namespace gcn
}
void Widget::setDimension(const Rectangle& dimension)
- {
+ {
const Rectangle oldDimension = mDimension;
mDimension = dimension;
@@ -317,8 +317,8 @@ namespace gcn
const Color& Widget::getSelectionColor() const
{
return mSelectionColor;
- }
-
+ }
+
void Widget::_setFocusHandler(FocusHandler* focusHandler)
{
if (mFocusHandler)
@@ -535,7 +535,7 @@ namespace gcn
if (mParent)
{
- return (mFocusHandler->getModalFocused() == this)
+ return (mFocusHandler->getModalFocused() == this)
|| mParent->isModalFocused();
}
@@ -552,7 +552,7 @@ namespace gcn
if (mParent)
{
- return (mFocusHandler->getModalMouseInputFocused() == this)
+ return (mFocusHandler->getModalMouseInputFocused() == this)
|| mParent->isModalMouseInputFocused();
}
@@ -664,4 +664,4 @@ namespace gcn
if (mParent)
mParent->showWidgetPart(this, rectangle);
}
-}
+} // namespace gcn
diff --git a/src/guichan/widgets/button.cpp b/src/guichan/widgets/button.cpp
index 8c0cf0f96..6ea6c8f3a 100644
--- a/src/guichan/widgets/button.cpp
+++ b/src/guichan/widgets/button.cpp
@@ -171,4 +171,4 @@ namespace gcn
mMousePressed = false;
mKeyPressed = false;
}
-}
+} // namespace gcn
diff --git a/src/guichan/widgets/checkbox.cpp b/src/guichan/widgets/checkbox.cpp
index 420345eda..4e76e75d2 100644
--- a/src/guichan/widgets/checkbox.cpp
+++ b/src/guichan/widgets/checkbox.cpp
@@ -130,4 +130,4 @@ namespace gcn
mSelected = !mSelected;
distributeActionEvent();
}
-}
+} // namespace gcn
diff --git a/src/guichan/widgets/container.cpp b/src/guichan/widgets/container.cpp
index e3bbeb995..19f992519 100644
--- a/src/guichan/widgets/container.cpp
+++ b/src/guichan/widgets/container.cpp
@@ -64,7 +64,6 @@ namespace gcn
Container::~Container()
{
-
}
void Container::draw(Graphics* graphics)
@@ -115,4 +114,4 @@ namespace gcn
{
return BasicContainer::findWidgetById(id);
}
-}
+} // namespace gcn
diff --git a/src/guichan/widgets/label.cpp b/src/guichan/widgets/label.cpp
index 9dce2bff9..db1ea6e8a 100644
--- a/src/guichan/widgets/label.cpp
+++ b/src/guichan/widgets/label.cpp
@@ -98,4 +98,4 @@ namespace gcn
void Label::adjustSize()
{
}
-}
+} // namespace gcn
diff --git a/src/guichan/widgets/listbox.cpp b/src/guichan/widgets/listbox.cpp
index 834a4bb82..938d82721 100644
--- a/src/guichan/widgets/listbox.cpp
+++ b/src/guichan/widgets/listbox.cpp
@@ -196,7 +196,7 @@ namespace gcn
{
mSelectionListeners.push_back(selectionListener);
}
-
+
void ListBox::removeSelectionListener(SelectionListener* selectionListener)
{
mSelectionListeners.remove(selectionListener);
@@ -217,4 +217,4 @@ namespace gcn
{
return getFont()->getHeight();
}
-}
+} // namespace gcn
diff --git a/src/guichan/widgets/radiobutton.cpp b/src/guichan/widgets/radiobutton.cpp
index 75136eb01..9be0b75c9 100644
--- a/src/guichan/widgets/radiobutton.cpp
+++ b/src/guichan/widgets/radiobutton.cpp
@@ -184,4 +184,4 @@ namespace gcn
void RadioButton::adjustSize()
{
}
-}
+} // namespace gcn
diff --git a/src/guichan/widgets/scrollarea.cpp b/src/guichan/widgets/scrollarea.cpp
index 67154fbad..6874e41c9 100644
--- a/src/guichan/widgets/scrollarea.cpp
+++ b/src/guichan/widgets/scrollarea.cpp
@@ -414,7 +414,7 @@ namespace gcn
{
mHBarVisible = (getContent()->getWidth() > w);
}
- else // (mVPolicy == SHOW_ALWAYS)
+ else // (mVPolicy == SHOW_ALWAYS)
{
mHBarVisible = (getContent()->getWidth()
> w - mScrollbarWidth);
@@ -440,7 +440,7 @@ namespace gcn
{
mVBarVisible = (getContent()->getHeight() > h);
}
- else // (mHPolicy == SHOW_ALWAYS)
+ else // (mHPolicy == SHOW_ALWAYS)
{
mVBarVisible = (getContent()->getHeight()
> h - mScrollbarWidth);
@@ -455,7 +455,7 @@ namespace gcn
{
const Rectangle area = Rectangle(0, 0,
mVBarVisible ? (getWidth() - mScrollbarWidth) : getWidth(),
- mHBarVisible ? (getHeight() - mScrollbarWidth) : getHeight());
+ mHBarVisible ? (getHeight() - mScrollbarWidth) : getHeight());
if (area.width < 0 || area.height < 0)
return Rectangle();
@@ -569,13 +569,8 @@ namespace gcn
mOpaque = opaque;
}
-
bool ScrollArea::isOpaque() const
{
return mOpaque;
}
-}
-
-/*
- * Wow! This is a looooong source file.
- */
+} // namespace gcn
diff --git a/src/guichan/widgets/slider.cpp b/src/guichan/widgets/slider.cpp
index 4e94d82ea..7611fdfd7 100644
--- a/src/guichan/widgets/slider.cpp
+++ b/src/guichan/widgets/slider.cpp
@@ -270,4 +270,4 @@ namespace gcn
mouseEvent.consume();
}
-}
+} // namespace gcn
diff --git a/src/guichan/widgets/textbox.cpp b/src/guichan/widgets/textbox.cpp
index c858c7ede..bfb6aff89 100644
--- a/src/guichan/widgets/textbox.cpp
+++ b/src/guichan/widgets/textbox.cpp
@@ -112,7 +112,6 @@ namespace gcn
std::string sub = text.substr(lastPos, length);
mTextRows.push_back(sub);
lastPos = pos + 1;
-
} while (pos != std::string::npos);
adjustSize();
@@ -176,7 +175,7 @@ namespace gcn
{
mCaretRow = row;
mCaretColumn = position;
- return; // we are done
+ return; // we are done
}
else
{
@@ -319,4 +318,4 @@ namespace gcn
{
mOpaque = opaque;
}
-}
+} // namespace gcn
diff --git a/src/guichan/widgets/textfield.cpp b/src/guichan/widgets/textfield.cpp
index 1dcf74215..7d9bd87f6 100644
--- a/src/guichan/widgets/textfield.cpp
+++ b/src/guichan/widgets/textfield.cpp
@@ -142,4 +142,4 @@ namespace gcn
void TextField::fontChanged()
{
}
-}
+} // namespace gcn
diff --git a/src/guichan/widgets/window.cpp b/src/guichan/widgets/window.cpp
index e541ef242..f04a47e9e 100644
--- a/src/guichan/widgets/window.cpp
+++ b/src/guichan/widgets/window.cpp
@@ -210,4 +210,4 @@ namespace gcn
setSize(w + 2* getPadding(), h + getPadding() + getTitleBarHeight());
}
-}
+} // namespace gcn
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index aabb024e7..522a3e259 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -614,8 +614,7 @@ Position LocalPlayer::getNextWalkPosition(const unsigned char dir) const
walkMask, Position(posX + 32, posY + 32));
}
}
-
- } // End of diagonal cases
+ } // End of diagonal cases
// Straight directions
// Right direction
@@ -638,7 +637,6 @@ Position LocalPlayer::getNextWalkPosition(const unsigned char dir) const
// before going further
return Position(tileX * 32 + 32 - radius,
tileY * 32 + radius);
-
}
}
@@ -651,7 +649,6 @@ Position LocalPlayer::getNextWalkPosition(const unsigned char dir) const
// before going further
return Position(tileX * 32 + 32 - radius,
tileY * 32 + 32 - radius);
-
}
}
// If the way is clear, step up one checked tile ahead.
@@ -680,7 +677,6 @@ Position LocalPlayer::getNextWalkPosition(const unsigned char dir) const
// before going further
return Position(tileX * 32 + radius,
tileY * 32 + radius);
-
}
}
@@ -693,7 +689,6 @@ Position LocalPlayer::getNextWalkPosition(const unsigned char dir) const
// before going further
return Position(tileX * 32 + radius,
tileY * 32 + 32 - radius);
-
}
}
// If the way is clear, step up one checked tile ahead.
@@ -722,7 +717,6 @@ Position LocalPlayer::getNextWalkPosition(const unsigned char dir) const
// before going further
return Position(tileX * 32 + radius,
tileY * 32 + radius);
-
}
}
@@ -735,7 +729,6 @@ Position LocalPlayer::getNextWalkPosition(const unsigned char dir) const
// before going further
return Position(tileX * 32 + 32 - radius,
tileY * 32 + radius);
-
}
}
// If the way is clear, step up one checked tile ahead.
@@ -776,7 +769,6 @@ Position LocalPlayer::getNextWalkPosition(const unsigned char dir) const
// before going further
return Position(tileX * 32 + 32 - radius,
tileY * 32 + 32 - radius);
-
}
}
// If the way is clear, step up one checked tile ahead.
@@ -1051,8 +1043,9 @@ void LocalPlayer::setWalkingDir(const unsigned char dir)
return;
}
- // If the delay to send another walk message to the server hasn't expired,
- // don't do anything or we could get disconnected for spamming the server
+ // If the delay to send another walk message to the server hasn't
+ // expired, don't do anything or we could get disconnected for
+ // spamming the server
if (get_elapsed_time(mLocalWalkTime) < walkingKeyboardDelay)
return;
}
@@ -1445,14 +1438,13 @@ int LocalPlayer::getAttackRange() const
}
else
{
- // TODO: Fix this to be more generic
const Item *const weapon = PlayerInfo::getEquipment(EQUIP_FIGHT1_SLOT);
if (weapon)
{
const ItemInfo &info = weapon->getInfo();
return info.getAttackRange();
}
- return 48; // unarmed range
+ return 48; // unarmed range
}
}
@@ -1659,7 +1651,7 @@ void LocalPlayer::processEvent(Channels channel,
{
mMessages.pop_back();
// TRANSLATORS: this is job experience
- pair.first.append(strprintf (", %d %s",
+ pair.first.append(strprintf(", %d %s",
change, _("job")));
mMessages.push_back(pair);
}
@@ -2251,10 +2243,10 @@ void LocalPlayer::changeEquipmentBeforeAttack(const Being *const target) const
if (!inv)
return;
- //if attack distance for sword
+ // if attack distance for sword
if (allowSword)
{
- //finding sword
+ // finding sword
item = inv->findItem(571, 0);
if (!item)
@@ -2576,20 +2568,20 @@ void LocalPlayer::crazyMove8()
// up, ri,do,le
static const int movesX[][4] =
{
- {-1, 0, 1, 0}, //move left
- { 0, 1, 0, -1}, //move up
- { 1, 0, -1, 0}, //move right
- { 0, -1, 0, 1} //move down
+ {-1, 0, 1, 0}, // move left
+ { 0, 1, 0, -1}, // move up
+ { 1, 0, -1, 0}, // move right
+ { 0, -1, 0, 1} // move down
};
// look
// up, ri,do,le
static const int movesY[][4] =
{
- { 0, -1, 0, 1}, //move left
- {-1, 0, 1, 0}, //move up
- { 0, 1, 0, -1}, //move right
- { 1, 0, -1, 0} //move down
+ { 0, -1, 0, 1}, // move left
+ {-1, 0, 1, 0}, // move up
+ { 0, 1, 0, -1}, // move right
+ { 1, 0, -1, 0} // move down
};
if (mDirection == Being::UP)
@@ -3002,10 +2994,7 @@ bool LocalPlayer::pickUpItems(int pickUpType)
FloorItem *item =
actorSpriteManager->findItem(x, y);
if (item)
- {
status = pickUp(item);
- //status = true;
- }
if (pickUpType == 0)
pickUpType = mPickUpType;
@@ -3172,23 +3161,23 @@ void LocalPlayer::magicAttack() const
switch (mMagicAttackType)
{
- //flar W00
+ // flar W00
case 0:
tryMagic("#flar", 1, 0, 10);
break;
- //chiza W01
+ // chiza W01
case 1:
tryMagic("#chiza", 1, 0, 9);
break;
- //ingrav W10
+ // ingrav W10
case 2:
tryMagic("#ingrav", 2, 2, 20);
break;
- //frillyar W11
+ // frillyar W11
case 3:
tryMagic("#frillyar", 2, 2, 25);
break;
- //upmarmu W12
+ // upmarmu W12
case 4:
tryMagic("#upmarmu", 2, 2, 20);
break;
diff --git a/src/map.cpp b/src/map.cpp
index 8e2bca209..314b21a2c 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -936,7 +936,7 @@ Path Map::findPath(const int startX, const int startY,
// Skip if the tile is on the closed list or is not walkable
// unless its the destination tile
- //+++ here need check block must depend on player abilities.
+ // +++ here need check block must depend on player abilities.
if (newTile->whichList == mOnClosedList ||
((newTile->blockmask & walkmask)
&& !(x == destX && y == destY))
@@ -954,7 +954,8 @@ Path Map::findPath(const int startX, const int startY,
const MetaTile *const t2 = &mMetaTiles[curr.x +
dx + curWidth];
- //+++ here need check block must depend on player abilities.
+ // +++ here need check block must depend
+ // on player abilities.
if (((t1->blockmask | t2->blockmask) & BLOCKMASK_WALL))
continue;
}
diff --git a/src/mobileopenglgraphics.cpp b/src/mobileopenglgraphics.cpp
index 3498010c4..f447655e4 100644
--- a/src/mobileopenglgraphics.cpp
+++ b/src/mobileopenglgraphics.cpp
@@ -281,7 +281,7 @@ bool MobileOpenGLGraphics::drawRescaledImage(const Image *const image,
drawRescaledQuad(image, srcX, srcY, dstX, dstY, width, height,
desiredWidth, desiredHeight);
- if (smooth) // A basic smooth effect...
+ if (smooth) // A basic smooth effect...
{
setColorAlpha(0.2f);
drawRescaledQuad(image, srcX, srcY, dstX - 1, dstY - 1, width, height,
@@ -347,22 +347,22 @@ void MobileOpenGLGraphics::drawImagePattern(const Image *const image,
const float texX2 = static_cast<float>(srcX + width) / tw;
- mFloatTexArray[vp + 0] = texX1; //1
+ mFloatTexArray[vp + 0] = texX1; // 1
mFloatTexArray[vp + 1] = texY1;
- mFloatTexArray[vp + 2] = texX2; //2
+ mFloatTexArray[vp + 2] = texX2; // 2
mFloatTexArray[vp + 3] = texY1;
- mFloatTexArray[vp + 4] = texX2; //3
+ mFloatTexArray[vp + 4] = texX2; // 3
mFloatTexArray[vp + 5] = texY2;
- mFloatTexArray[vp + 6] = texX1; //1
+ mFloatTexArray[vp + 6] = texX1; // 1
mFloatTexArray[vp + 7] = texY1;
- mFloatTexArray[vp + 8] = texX1; //4
+ mFloatTexArray[vp + 8] = texX1; // 4
mFloatTexArray[vp + 9] = texY2;
- mFloatTexArray[vp + 10] = texX2; //3
+ mFloatTexArray[vp + 10] = texX2; // 3
mFloatTexArray[vp + 11] = texY2;
mShortVertArray[vp + 0] = static_cast<GLshort>(dstX);
@@ -828,7 +828,7 @@ void MobileOpenGLGraphics::updateScreen()
#endif
SDL_GL_SwapBuffers();
// may be need clear?
-// glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+// glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
BLOCK_END("Graphics::updateScreen")
}
@@ -1285,4 +1285,4 @@ void MobileOpenGLGraphics::debugBindTexture(const Image *const image A_UNUSED)
}
#endif
-#endif // USE_OPENGL
+#endif // USE_OPENGL
diff --git a/src/mumblemanager.cpp b/src/mumblemanager.cpp
index 2911d8df5..44e227e15 100644
--- a/src/mumblemanager.cpp
+++ b/src/mumblemanager.cpp
@@ -145,7 +145,7 @@ void MumbleManager::init()
//
// 1 unit = 1 meter
- // Unit vector pointing out of the avatars eyes
+ // Unit vector pointing out of the avatars eyes
// (here Front looks into scene).
/* no way to look "up", 2d */
mLinkedMemCache.fAvatarFront[1] = 0.0f;
diff --git a/src/navigationmanager.cpp b/src/navigationmanager.cpp
index 46d930efc..c6d091fa2 100644
--- a/src/navigationmanager.cpp
+++ b/src/navigationmanager.cpp
@@ -39,7 +39,7 @@ namespace
int x;
int y;
};
-}
+} // namespace
NavigationManager::NavigationManager()
{
diff --git a/src/net/ea/adminhandler.h b/src/net/ea/adminhandler.h
index fa2addfea..06dc7ab8c 100644
--- a/src/net/ea/adminhandler.h
+++ b/src/net/ea/adminhandler.h
@@ -57,6 +57,6 @@ class AdminHandler : public Net::AdminHandler
const int x, const int y) const override;
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_ADMINHANDLER_H
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 6f9cef522..8fb443803 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -556,7 +556,7 @@ void BeingHandler::processBeingSelfEffect(Net::MessageIn &msg) const
if (Particle::enabled)
effectManager->trigger(effectType, being);
- //+++ need dehard code effectType == 3
+ // +++ need dehard code effectType == 3
if (effectType == 3 && being->getType() == Being::PLAYER
&& socialWindow)
{ // reset received damage
@@ -806,4 +806,4 @@ void BeingHandler::processPvpSet(Net::MessageIn &msg) const
}
}
-} // namespace Ea
+} // namespace Ea
diff --git a/src/net/ea/beinghandler.h b/src/net/ea/beinghandler.h
index 9f8fd7842..46a28b908 100644
--- a/src/net/ea/beinghandler.h
+++ b/src/net/ea/beinghandler.h
@@ -102,6 +102,6 @@ class BeingHandler : public Net::BeingHandler
bool mHideShield;
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_BEINGHANDLER_H
diff --git a/src/net/ea/buysellhandler.h b/src/net/ea/buysellhandler.h
index 2240872b9..fb7db09e0 100644
--- a/src/net/ea/buysellhandler.h
+++ b/src/net/ea/buysellhandler.h
@@ -65,6 +65,6 @@ class BuySellHandler : public Net::BuySellHandler
BuyDialog *mBuyDialog;
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_BUYSELLHANDLER_H
diff --git a/src/net/ea/charserverhandler.h b/src/net/ea/charserverhandler.h
index 6622371b3..be91ef017 100644
--- a/src/net/ea/charserverhandler.h
+++ b/src/net/ea/charserverhandler.h
@@ -92,6 +92,6 @@ class CharServerHandler : public Net::CharServerHandler
const bool withColors) const = 0;
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_CHARSERVERHANDLER_H
diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h
index 869d52153..fb286a845 100644
--- a/src/net/ea/chathandler.h
+++ b/src/net/ea/chathandler.h
@@ -63,6 +63,6 @@ class ChatHandler : public Net::ChatHandler
bool mShowAllLang;
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_CHATHANDLER_H
diff --git a/src/net/ea/gamehandler.h b/src/net/ea/gamehandler.h
index d6c9cebdc..98b108a0d 100644
--- a/src/net/ea/gamehandler.h
+++ b/src/net/ea/gamehandler.h
@@ -64,6 +64,6 @@ class GameHandler : public Net::GameHandler
int mCharID; /// < Saved for map-server switching
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_GAMEHANDLER_H
diff --git a/src/net/ea/gui/guildtab.h b/src/net/ea/gui/guildtab.h
index d7b48f09f..6558cbef1 100644
--- a/src/net/ea/gui/guildtab.h
+++ b/src/net/ea/gui/guildtab.h
@@ -60,6 +60,6 @@ class GuildTab : public ChatTab, public ConfigListener
void getAutoCompleteList(StringVect &names) const override;
};
-} // namespace Ea
+} // namespace Ea
-#endif // EA_GUILDTAB_H
+#endif // EA_GUILDTAB_H
diff --git a/src/net/ea/gui/partytab.h b/src/net/ea/gui/partytab.h
index 129125faf..e1fd7e4c3 100644
--- a/src/net/ea/gui/partytab.h
+++ b/src/net/ea/gui/partytab.h
@@ -60,6 +60,6 @@ class PartyTab : public ChatTab
extern PartyTab *partyTab;
-} // namespace Ea
+} // namespace Ea
-#endif // EA_PARTYTAB_H
+#endif // EA_PARTYTAB_H
diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp
index 19f892ed5..65fa32634 100644
--- a/src/net/ea/guildhandler.cpp
+++ b/src/net/ea/guildhandler.cpp
@@ -156,17 +156,17 @@ void GuildHandler::processGuildMasterOrMember(Net::MessageIn &msg) const
void GuildHandler::processGuildBasicInfo(Net::MessageIn &msg)
{
- const int guildId = msg.readInt32(); // Guild ID
- const int level = msg.readInt32(); // Guild level
- const int members = msg.readInt32(); // 'Connect member'
- const int maxMembers = msg.readInt32(); // 'Max member'
- const int avgLevel = msg.readInt32(); // Average level
- const int exp = msg.readInt32(); // Exp
- const int nextExp = msg.readInt32(); // Next exp
- msg.skip(16); // 0 unused
- std::string name = msg.readString(24); // Name
- std::string master = msg.readString(24); // Master's name
- std::string castle = msg.readString(20); // Castles
+ const int guildId = msg.readInt32(); // Guild ID
+ const int level = msg.readInt32(); // Guild level
+ const int members = msg.readInt32(); // 'Connect member'
+ const int maxMembers = msg.readInt32(); // 'Max member'
+ const int avgLevel = msg.readInt32(); // Average level
+ const int exp = msg.readInt32(); // Exp
+ const int nextExp = msg.readInt32(); // Next exp
+ msg.skip(16); // 0 unused
+ std::string name = msg.readString(24); // Name
+ std::string master = msg.readString(24); // Master's name
+ std::string castle = msg.readString(20); // Castles
// (ie: "Six Castles" or "None Taken")
if (guildTab && showBasicInfo)
diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h
index 2d47853f6..415acd2e5 100644
--- a/src/net/ea/inventoryhandler.h
+++ b/src/net/ea/inventoryhandler.h
@@ -210,6 +210,6 @@ class InventoryHandler : public Net::InventoryHandler
PickupQueue mSentPickups;
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_INVENTORYHANDLER_H
diff --git a/src/net/ea/itemhandler.h b/src/net/ea/itemhandler.h
index 193c3f7c9..5aa1ee51a 100644
--- a/src/net/ea/itemhandler.h
+++ b/src/net/ea/itemhandler.h
@@ -43,6 +43,6 @@ class ItemHandler
void processItemDropped(Net::MessageIn &msg);
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_ITEMHANDLER_H
diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h
index 1efc94a2a..0c290f583 100644
--- a/src/net/ea/loginhandler.h
+++ b/src/net/ea/loginhandler.h
@@ -104,6 +104,6 @@ class LoginHandler : public Net::LoginHandler
Token mToken;
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_TA_LOGINHANDLER_H
diff --git a/src/net/ea/network.h b/src/net/ea/network.h
index 5e957346b..823fa2714 100644
--- a/src/net/ea/network.h
+++ b/src/net/ea/network.h
@@ -112,6 +112,6 @@ class Network
int mSleep;
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_NETWORK_H
diff --git a/src/net/ea/npchandler.h b/src/net/ea/npchandler.h
index 526ced9f0..6bc88aac7 100644
--- a/src/net/ea/npchandler.h
+++ b/src/net/ea/npchandler.h
@@ -75,6 +75,6 @@ class NpcHandler : public Net::NpcHandler
NpcDialog *mDialog;
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_NPCHANDLER_H
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index 0c00588ce..0909232dd 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -266,19 +266,19 @@ void PartyHandler::processPartySettings(Net::MessageIn &msg)
void PartyHandler::processPartyMove(Net::MessageIn &msg) const
{
- const int id = msg.readInt32(); // id
+ const int id = msg.readInt32(); // id
PartyMember *m = nullptr;
if (Ea::taParty)
m = Ea::taParty->getMember(id);
if (m)
{
- msg.skip(4); // 0
- m->setX(msg.readInt16()); // x
- m->setY(msg.readInt16()); // y
- m->setOnline(msg.readInt8()); // online (if 0)
- msg.readString(24); // party
- msg.readString(24); // nick
- m->setMap(msg.readString(16)); // map
+ msg.skip(4); // 0
+ m->setX(msg.readInt16()); // x
+ m->setY(msg.readInt16()); // y
+ m->setOnline(msg.readInt8()); // online (if 0)
+ msg.readString(24); // party
+ msg.readString(24); // nick
+ m->setMap(msg.readString(16)); // map
}
else
{
diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h
index 62d08034a..9a9867916 100644
--- a/src/net/ea/partyhandler.h
+++ b/src/net/ea/partyhandler.h
@@ -84,6 +84,6 @@ class PartyHandler : public Net::PartyHandler
extern PartyTab *partyTab;
extern Party *taParty;
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_PARTYHANDLER_H
diff --git a/src/net/ea/playerhandler.h b/src/net/ea/playerhandler.h
index 57ff3b6af..02241df97 100644
--- a/src/net/ea/playerhandler.h
+++ b/src/net/ea/playerhandler.h
@@ -73,6 +73,6 @@ class PlayerHandler : public Net::PlayerHandler
void processPlayerArrowMessage(Net::MessageIn &msg) const;
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_PLAYERHANDLER_H
diff --git a/src/net/ea/skillhandler.h b/src/net/ea/skillhandler.h
index f0be31d58..8a5cb93cc 100644
--- a/src/net/ea/skillhandler.h
+++ b/src/net/ea/skillhandler.h
@@ -44,6 +44,6 @@ class SkillHandler : public Net::SkillHandler
void processSkillFailed(Net::MessageIn &msg) const;
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_SKILLHANDLER_H
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index 1da4271b1..aa6952b65 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -57,7 +57,7 @@ namespace
Net::getTradeHandler()->respond(eventId == "yes");
}
} listener;
-} // anonimous
+} // namespace
namespace Ea
{
diff --git a/src/net/ea/tradehandler.h b/src/net/ea/tradehandler.h
index b7be2704e..c01f36fd8 100644
--- a/src/net/ea/tradehandler.h
+++ b/src/net/ea/tradehandler.h
@@ -54,6 +54,6 @@ class TradeHandler : public Net::TradeHandler
void processTradeComplete(Net::MessageIn &msg);
};
-} // namespace Ea
+} // namespace Ea
#endif // NET_EA_TRADEHANDLER_H
diff --git a/src/net/eathena/adminhandler.h b/src/net/eathena/adminhandler.h
index 9efc4acf5..9b8490f50 100644
--- a/src/net/eathena/adminhandler.h
+++ b/src/net/eathena/adminhandler.h
@@ -51,6 +51,6 @@ class AdminHandler final : public MessageHandler, public Ea::AdminHandler
void kick(const int playerId) const override;
};
-} // namespace EAthena
+} // namespace EAthena
#endif // NET_EATHENA_ADMINHANDLER_H
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 6de4bf1b7..f3680f3c9 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -588,7 +588,6 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
logger->log("dstBeing id:" + toString(dstBeing->getId()));
logger->log("dstBeing name:" + dstBeing->getName());
break;
-
}
}
else if (msgType == 3)
@@ -805,4 +804,4 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
dstBeing->setStatusEffectBlock(16, statusEffects & 0xffff);
}
-} // namespace EAthena
+} // namespace EAthena
diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h
index 360d8ca2b..cc65c3ea8 100644
--- a/src/net/eathena/beinghandler.h
+++ b/src/net/eathena/beinghandler.h
@@ -59,6 +59,6 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
const int type) const;
};
-} // namespace EAthena
+} // namespace EAthena
-#endif // NET_EATHENA_BEINGHANDLER_H
+#endif // NET_EATHENA_BEINGHANDLER_H
diff --git a/src/net/eathena/buysellhandler.h b/src/net/eathena/buysellhandler.h
index 0a1042174..ca3abfd09 100644
--- a/src/net/eathena/buysellhandler.h
+++ b/src/net/eathena/buysellhandler.h
@@ -46,6 +46,6 @@ class BuySellHandler final : public MessageHandler, public Ea::BuySellHandler
virtual void processNpcSellResponse(Net::MessageIn &msg) const;
};
-} // namespace EAthena
+} // namespace EAthena
-#endif // NET_EATHENA_BUYSELLHANDLER_H
+#endif // NET_EATHENA_BUYSELLHANDLER_H
diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h
index 3a49dbb9a..2dfdff8c1 100644
--- a/src/net/eathena/charserverhandler.h
+++ b/src/net/eathena/charserverhandler.h
@@ -70,6 +70,6 @@ class CharServerHandler final : public MessageHandler,
const bool) const override;
};
-} // namespace EAthena
+} // namespace EAthena
-#endif // NET_EATHENA_CHARSERVERHANDLER_H
+#endif // NET_EATHENA_CHARSERVERHANDLER_H
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index 6840116da..1d31b3c16 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -61,6 +61,6 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
static void processRaw(MessageOut &outMsg, const std::string &line);
};
-} // namespace EAthena
+} // namespace EAthena
#endif // NET_EATHENA_CHATHANDLER_H
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp
index 2ec9899c2..cdb3029bc 100644
--- a/src/net/eathena/gamehandler.cpp
+++ b/src/net/eathena/gamehandler.cpp
@@ -171,7 +171,7 @@ void GameHandler::disconnect2() const
void GameHandler::processMapCharId(Net::MessageIn &msg) const
{
- msg.readInt32(); // char id
+ msg.readInt32(); // char id
}
} // namespace EAthena
diff --git a/src/net/eathena/gamehandler.h b/src/net/eathena/gamehandler.h
index 2de3ccaac..61959ecd1 100644
--- a/src/net/eathena/gamehandler.h
+++ b/src/net/eathena/gamehandler.h
@@ -62,6 +62,6 @@ class GameHandler final : public MessageHandler, public Ea::GameHandler
{ return true; }
};
-} // namespace EAthena
+} // namespace EAthena
-#endif // NET_EATHENA_MAPHANDLER_H
+#endif // NET_EATHENA_MAPHANDLER_H
diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h
index a0b65b842..fc86beff2 100644
--- a/src/net/eathena/generalhandler.h
+++ b/src/net/eathena/generalhandler.h
@@ -79,6 +79,6 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mTradeHandler;
};
-} // namespace EAthena
+} // namespace EAthena
-#endif // NET_EATHENA_GENERALHANDLER_H
+#endif // NET_EATHENA_GENERALHANDLER_H
diff --git a/src/net/eathena/gui/guildtab.h b/src/net/eathena/gui/guildtab.h
index 77fbc3ee7..eb4ac077e 100644
--- a/src/net/eathena/gui/guildtab.h
+++ b/src/net/eathena/gui/guildtab.h
@@ -41,6 +41,6 @@ class GuildTab : public Ea::GuildTab
~GuildTab();
};
-} // namespace EAthena
+} // namespace EAthena
-#endif // EATHENA_GUILDTAB_H
+#endif // EATHENA_GUILDTAB_H
diff --git a/src/net/eathena/gui/partytab.h b/src/net/eathena/gui/partytab.h
index 4569b7f05..1e9bbc920 100644
--- a/src/net/eathena/gui/partytab.h
+++ b/src/net/eathena/gui/partytab.h
@@ -41,6 +41,6 @@ class PartyTab : public Ea::PartyTab
~PartyTab();
};
-} // namespace EAthena
+} // namespace EAthena
-#endif // EATHENA_PARTYTAB_H
+#endif // EATHENA_PARTYTAB_H
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index e9d4109dc..8785fd83c 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -233,7 +233,7 @@ void GuildHandler::inviteResponse(const int guildId,
MessageOut msg(CMSG_GUILD_INVITE_REPLY);
msg.writeInt32(guildId);
msg.writeInt8(response);
- msg.writeInt8(0); // unused
+ msg.writeInt8(0); // unused
msg.writeInt16(0); // unused
}
@@ -244,9 +244,9 @@ void GuildHandler::leave(const int guildId) const
MessageOut msg(CMSG_GUILD_LEAVE);
msg.writeInt32(guildId);
- msg.writeInt32(player_node->getId()); // Account ID
- msg.writeInt32(PlayerInfo::getCharId()); // Char ID
- msg.writeString("", 40); // Message
+ msg.writeInt32(player_node->getId()); // Account ID
+ msg.writeInt32(PlayerInfo::getCharId()); // Char ID
+ msg.writeString("", 40); // Message
}
void GuildHandler::kick(const GuildMember *const member,
diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h
index f6e87fd2a..25fc25b17 100644
--- a/src/net/eathena/inventoryhandler.h
+++ b/src/net/eathena/inventoryhandler.h
@@ -60,6 +60,6 @@ class InventoryHandler final : public MessageHandler,
const int amount, const int destination) const override;
};
-} // namespace EAthena
+} // namespace EAthena
#endif // NET_EATHENA_INVENTORYHANDLER_H
diff --git a/src/net/eathena/itemhandler.h b/src/net/eathena/itemhandler.h
index f3ae193de..071dc7337 100644
--- a/src/net/eathena/itemhandler.h
+++ b/src/net/eathena/itemhandler.h
@@ -40,6 +40,6 @@ class ItemHandler final : public MessageHandler, public Ea::ItemHandler
virtual void handleMessage(Net::MessageIn &msg) override;
};
-} // namespace EAthena
+} // namespace EAthena
-#endif // NET_EATHENA_ITEMHANDLER_H
+#endif // NET_EATHENA_ITEMHANDLER_H
diff --git a/src/net/eathena/loginhandler.h b/src/net/eathena/loginhandler.h
index d542777cd..00eee5949 100644
--- a/src/net/eathena/loginhandler.h
+++ b/src/net/eathena/loginhandler.h
@@ -77,6 +77,6 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler
const std::string &email) const override;
};
-} // namespace EAthena
+} // namespace EAthena
-#endif // NET_EATHENA_LOGINHANDLER_H
+#endif // NET_EATHENA_LOGINHANDLER_H
diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp
index 42d16396d..1b234a13c 100644
--- a/src/net/eathena/network.cpp
+++ b/src/net/eathena/network.cpp
@@ -109,7 +109,7 @@ short packet_lengths[] =
};
static const int packet_lengths_size
- = static_cast<int>(sizeof(packet_lengths) / sizeof (short));
+ = static_cast<int>(sizeof(packet_lengths) / sizeof(short));
static const int messagesSize = 0xffff;
Network *Network::mInstance = nullptr;
diff --git a/src/net/eathena/network.h b/src/net/eathena/network.h
index 8babc4d19..ea7a5506d 100644
--- a/src/net/eathena/network.h
+++ b/src/net/eathena/network.h
@@ -66,6 +66,6 @@ class Network final : public Ea::Network
static Network *mInstance;
};
-} // namespace EAthena
+} // namespace EAthena
-#endif // NET_EATHENA_NETWORK_H
+#endif // NET_EATHENA_NETWORK_H
diff --git a/src/net/eathena/npchandler.h b/src/net/eathena/npchandler.h
index 196da8398..e48c0e8ab 100644
--- a/src/net/eathena/npchandler.h
+++ b/src/net/eathena/npchandler.h
@@ -78,6 +78,6 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
void processNpcViewPoint(Net::MessageIn &msg, const int npcId) const;
};
-} // namespace EAthena
+} // namespace EAthena
-#endif // NET_EATHENA_NPCHANDLER_H
+#endif // NET_EATHENA_NPCHANDLER_H
diff --git a/src/net/eathena/partyhandler.h b/src/net/eathena/partyhandler.h
index 7e3e6630b..ec79c2c57 100644
--- a/src/net/eathena/partyhandler.h
+++ b/src/net/eathena/partyhandler.h
@@ -65,6 +65,6 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler
void setShareItems(const PartyShare share) const override;
};
-} // namespace EAthena
+} // namespace EAthena
#endif // NET_EATHENA_PARTYHANDLER_H
diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h
index ec8fcd5cb..6cea52890 100644
--- a/src/net/eathena/playerhandler.h
+++ b/src/net/eathena/playerhandler.h
@@ -63,6 +63,6 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
void respawn() const override;
};
-} // namespace EAthena
+} // namespace EAthena
-#endif // NET_EATHENA_PLAYERHANDLER_H
+#endif // NET_EATHENA_PLAYERHANDLER_H
diff --git a/src/net/eathena/skillhandler.h b/src/net/eathena/skillhandler.h
index a44718d3f..2680d2c56 100644
--- a/src/net/eathena/skillhandler.h
+++ b/src/net/eathena/skillhandler.h
@@ -51,6 +51,6 @@ class SkillHandler final : public MessageHandler, public Ea::SkillHandler
void useMap(const int id, const std::string &map) const override;
};
-} // namespace EAthena
+} // namespace EAthena
-#endif // NET_EATHENA_SKILLHANDLER_H
+#endif // NET_EATHENA_SKILLHANDLER_H
diff --git a/src/net/eathena/tradehandler.h b/src/net/eathena/tradehandler.h
index 290a0fd92..89284f5cd 100644
--- a/src/net/eathena/tradehandler.h
+++ b/src/net/eathena/tradehandler.h
@@ -57,6 +57,6 @@ class TradeHandler final : public MessageHandler, public Ea::TradeHandler
void cancel() const override;
};
-} // namespace EAthena
+} // namespace EAthena
#endif // NET_EATHENA_TRADEHANDLER_H
diff --git a/src/net/tmwa/adminhandler.h b/src/net/tmwa/adminhandler.h
index 07f3fbd8e..621bf6466 100644
--- a/src/net/tmwa/adminhandler.h
+++ b/src/net/tmwa/adminhandler.h
@@ -51,6 +51,6 @@ class AdminHandler final : public MessageHandler, public Ea::AdminHandler
void kick(const int playerId) const override;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_ADMINHANDLER_H
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 8e367b0c3..07cef46fd 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -486,7 +486,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
colors[1] = msg.readInt8();
colors[2] = msg.readInt8();
- msg.readInt8(); //unused
+ msg.readInt8(); // unused
const int guild = msg.readInt32(); // guild
@@ -598,7 +598,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
break;
default:
- //need set stay state?
+ // need set stand state?
logger->log("QQQ2 SMSG_PLAYER_UPDATE_1:"
+ toString(id) + " " + toString(type));
logger->log("dstBeing id:"
diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h
index 39b868b24..2aafcc699 100644
--- a/src/net/tmwa/beinghandler.h
+++ b/src/net/tmwa/beinghandler.h
@@ -56,6 +56,6 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
const int type) const;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_BEINGHANDLER_H
diff --git a/src/net/tmwa/buysellhandler.h b/src/net/tmwa/buysellhandler.h
index aa1092ffc..a74272816 100644
--- a/src/net/tmwa/buysellhandler.h
+++ b/src/net/tmwa/buysellhandler.h
@@ -46,6 +46,6 @@ class BuySellHandler final : public MessageHandler, public Ea::BuySellHandler
virtual void processNpcSellResponse(Net::MessageIn &msg) const;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_BUYSELLHANDLER_H
diff --git a/src/net/tmwa/charserverhandler.h b/src/net/tmwa/charserverhandler.h
index 9d4006a4a..a4fc5c572 100644
--- a/src/net/tmwa/charserverhandler.h
+++ b/src/net/tmwa/charserverhandler.h
@@ -70,6 +70,6 @@ class CharServerHandler final : public MessageHandler,
const bool withColors) const override;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_CHARSERVERHANDLER_H
diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h
index eae168e59..b9a0e71bc 100644
--- a/src/net/tmwa/chathandler.h
+++ b/src/net/tmwa/chathandler.h
@@ -61,6 +61,6 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
static void processRaw(MessageOut &outMsg, const std::string &line);
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_CHATHANDLER_H
diff --git a/src/net/tmwa/gamehandler.h b/src/net/tmwa/gamehandler.h
index 9a63ddaf4..37b1d0570 100644
--- a/src/net/tmwa/gamehandler.h
+++ b/src/net/tmwa/gamehandler.h
@@ -60,6 +60,6 @@ class GameHandler final : public MessageHandler, public Ea::GameHandler
{ return false; }
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_MAPHANDLER_H
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index 57f704074..145da6793 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -80,6 +80,6 @@ class GeneralHandler final : public MessageHandler,
MessageHandlerPtr mQuestHandler;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_GENERALHANDLER_H
diff --git a/src/net/tmwa/gui/guildtab.h b/src/net/tmwa/gui/guildtab.h
index 67e2a3ee9..950c6ad10 100644
--- a/src/net/tmwa/gui/guildtab.h
+++ b/src/net/tmwa/gui/guildtab.h
@@ -41,6 +41,6 @@ class GuildTab : public Ea::GuildTab
~GuildTab();
};
-} // namespace TmwAthena
+} // namespace TmwAthena
-#endif // TA_GUILDTAB_H
+#endif // TA_GUILDTAB_H
diff --git a/src/net/tmwa/gui/partytab.h b/src/net/tmwa/gui/partytab.h
index 6d33c6ce9..08ac9bad7 100644
--- a/src/net/tmwa/gui/partytab.h
+++ b/src/net/tmwa/gui/partytab.h
@@ -41,6 +41,6 @@ class PartyTab : public Ea::PartyTab
~PartyTab();
};
-} // namespace TmwAthena
+} // namespace TmwAthena
-#endif // TA_PARTYTAB_H
+#endif // TA_PARTYTAB_H
diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h
index 707a9169c..124aedd2f 100644
--- a/src/net/tmwa/inventoryhandler.h
+++ b/src/net/tmwa/inventoryhandler.h
@@ -60,6 +60,6 @@ class InventoryHandler final : public MessageHandler,
const int amount, const int destination) const override;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_INVENTORYHANDLER_H
diff --git a/src/net/tmwa/itemhandler.h b/src/net/tmwa/itemhandler.h
index 06359c1d9..a343b4e8d 100644
--- a/src/net/tmwa/itemhandler.h
+++ b/src/net/tmwa/itemhandler.h
@@ -40,6 +40,6 @@ class ItemHandler final : public MessageHandler, public Ea::ItemHandler
virtual void handleMessage(Net::MessageIn &msg) override;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_ITEMHANDLER_H
diff --git a/src/net/tmwa/loginhandler.h b/src/net/tmwa/loginhandler.h
index 6d8436fbd..c327b558b 100644
--- a/src/net/tmwa/loginhandler.h
+++ b/src/net/tmwa/loginhandler.h
@@ -76,6 +76,6 @@ class LoginHandler final : public MessageHandler, public Ea::LoginHandler
const std::string &email) const override;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_LOGINHANDLER_H
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp
index 120cbb158..dd752af72 100644
--- a/src/net/tmwa/network.cpp
+++ b/src/net/tmwa/network.cpp
@@ -87,7 +87,7 @@ short packet_lengths[] =
};
static const int packet_lengths_size
- = static_cast<int>(sizeof(packet_lengths) / sizeof (short));
+ = static_cast<int>(sizeof(packet_lengths) / sizeof(short));
static const int messagesSize = 0xffff;
Network *Network::mInstance = nullptr;
diff --git a/src/net/tmwa/network.h b/src/net/tmwa/network.h
index 1d89d9a76..54d082cb5 100644
--- a/src/net/tmwa/network.h
+++ b/src/net/tmwa/network.h
@@ -67,6 +67,6 @@ class Network final : public Ea::Network
static Network *mInstance;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_NETWORK_H
diff --git a/src/net/tmwa/npchandler.h b/src/net/tmwa/npchandler.h
index 139f37872..db7d5ade1 100644
--- a/src/net/tmwa/npchandler.h
+++ b/src/net/tmwa/npchandler.h
@@ -82,6 +82,6 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
bool mRequestLang;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_NPCHANDLER_H
diff --git a/src/net/tmwa/partyhandler.h b/src/net/tmwa/partyhandler.h
index 6efd87868..0d1ca1f38 100644
--- a/src/net/tmwa/partyhandler.h
+++ b/src/net/tmwa/partyhandler.h
@@ -65,6 +65,6 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler
void setShareItems(const PartyShare share) const override;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_PARTYHANDLER_H
diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h
index 8307d7d05..b8f019d2c 100644
--- a/src/net/tmwa/playerhandler.h
+++ b/src/net/tmwa/playerhandler.h
@@ -61,6 +61,6 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
void respawn() const override;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_PLAYERHANDLER_H
diff --git a/src/net/tmwa/questhandler.h b/src/net/tmwa/questhandler.h
index 61d40d6b1..f87b27cc0 100644
--- a/src/net/tmwa/questhandler.h
+++ b/src/net/tmwa/questhandler.h
@@ -47,6 +47,6 @@ class QuestHandler final : public MessageHandler
void processPlayerQuests(Net::MessageIn &msg) const;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_QUESTHANDLER_H
diff --git a/src/net/tmwa/skillhandler.h b/src/net/tmwa/skillhandler.h
index 12a6021e5..2dcd60540 100644
--- a/src/net/tmwa/skillhandler.h
+++ b/src/net/tmwa/skillhandler.h
@@ -51,6 +51,6 @@ class SkillHandler final : public MessageHandler, public Ea::SkillHandler
void useMap(const int id, const std::string &map) const override;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_SKILLHANDLER_H
diff --git a/src/net/tmwa/tradehandler.h b/src/net/tmwa/tradehandler.h
index 7a88c61be..6a4f8f59d 100644
--- a/src/net/tmwa/tradehandler.h
+++ b/src/net/tmwa/tradehandler.h
@@ -57,6 +57,6 @@ class TradeHandler final : public MessageHandler, public Ea::TradeHandler
void cancel() const override;
};
-} // namespace TmwAthena
+} // namespace TmwAthena
#endif // NET_TA_TRADEHANDLER_H
diff --git a/src/particle.cpp b/src/particle.cpp
index 50b41018e..3edee622d 100644
--- a/src/particle.cpp
+++ b/src/particle.cpp
@@ -210,7 +210,7 @@ bool Particle::update()
{
Particle *const p = *it;
p->moveBy(mPos);
- mChildParticles.push_back (p);
+ mChildParticles.push_back(p);
}
}
}
diff --git a/src/playerinfo.h b/src/playerinfo.h
index c80cd84c7..2fec7d960 100644
--- a/src/playerinfo.h
+++ b/src/playerinfo.h
@@ -245,6 +245,6 @@ namespace PlayerInfo
void setEquipmentBackend(Equipment::Backend *const backend);
-} // namespace PlayerInfo
+} // namespace PlayerInfo
#endif
diff --git a/src/resources/atlasmanager.cpp b/src/resources/atlasmanager.cpp
index 0d43d59c8..27ab3053a 100644
--- a/src/resources/atlasmanager.cpp
+++ b/src/resources/atlasmanager.cpp
@@ -102,7 +102,6 @@ void AtlasManager::loadImages(const StringVect &files,
Resource *const res = resman->getTempResource(str);
if (res)
{
- //logger->log("Resource %s already in cache", str.c_str());
// increase counter because in moveToDeleted it will be decreased.
res->incRef();
resman->moveToDeleted(res);
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp
index 9e2f9a395..fc6139e83 100644
--- a/src/resources/beinginfo.cpp
+++ b/src/resources/beinginfo.cpp
@@ -112,7 +112,6 @@ const std::string &BeingInfo::getSound(const SoundEvent event) const
const Attack *BeingInfo::getAttack(const int id) const
{
-
const Attacks::const_iterator i = mAttacks.find(id);
return (i == mAttacks.end()) ? empty : (*i).second;
}
diff --git a/src/resources/chardb.cpp b/src/resources/chardb.cpp
index 577cdc111..7c741c15c 100644
--- a/src/resources/chardb.cpp
+++ b/src/resources/chardb.cpp
@@ -37,7 +37,7 @@ namespace
unsigned mMaxStat = 0;
unsigned mSumStat = 0;
std::vector<int> mDefaultItems;
-}
+} // namespace
void CharDB::load()
{
diff --git a/src/resources/cursor.cpp b/src/resources/cursor.cpp
index 15fe28e26..5ce5527df 100644
--- a/src/resources/cursor.cpp
+++ b/src/resources/cursor.cpp
@@ -64,5 +64,4 @@ namespace Cursor
}
return CURSOR_POINTER;
}
-
-}
+}// namespace Cursor
diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp
index 202ab0675..13b635d45 100644
--- a/src/resources/dye.cpp
+++ b/src/resources/dye.cpp
@@ -382,7 +382,6 @@ void Dye::instantiate(std::string &target, const std::string &palettes)
{
s << palettes.substr(pal_pos);
s << target.substr(next_pos);
- //pal_pos = std::string::npos;
break;
}
s << palettes.substr(pal_pos, pal_next_pos - pal_pos);
diff --git a/src/resources/emotedb.cpp b/src/resources/emotedb.cpp
index 0492cb848..8dc401716 100644
--- a/src/resources/emotedb.cpp
+++ b/src/resources/emotedb.cpp
@@ -62,7 +62,7 @@ void EmoteDB::load()
return;
}
- //iterate <emote>s
+ // iterate <emote>s
for_each_xml_child_node(emoteNode, rootNode)
{
if (!xmlNameEqual(emoteNode, "emote"))
@@ -121,7 +121,7 @@ void EmoteDB::load()
return;
}
- //iterate <emote>s
+ // iterate <emote>s
for_each_xml_child_node(emoteNode, rootNode)
{
if (!xmlNameEqual(emoteNode, "emote"))
diff --git a/src/resources/iteminfo.cpp b/src/resources/iteminfo.cpp
index 04be2fc6f..325528d60 100644
--- a/src/resources/iteminfo.cpp
+++ b/src/resources/iteminfo.cpp
@@ -99,7 +99,7 @@ const std::string &ItemInfo::getSprite(const Gender gender,
void ItemInfo::setAttackAction(std::string attackAction)
{
if (attackAction.empty())
- mAttackAction = SpriteAction::ATTACK; // (Equal to unarmed animation)
+ mAttackAction = SpriteAction::ATTACK; // (Equal to unarmed animation)
else
mAttackAction = attackAction;
}
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 464680620..f74b5ff07 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -60,12 +60,12 @@ static std::string resolveRelativePath(std::string base, std::string relative)
while (relative.substr(0, 3) == "../")
{
relative.erase(0, 3); // Remove "../"
- if (!base.empty()) // If base is already empty, we can't trim anymore
+ if (!base.empty()) // If base is already empty, we can't trim anymore
{
i = base.find_last_of('/');
if (i == std::string::npos)
i = 0;
- base.erase(i, base.length()); // Remove deepest folder in base
+ base.erase(i, base.length()); // Remove deepest folder in base
}
}
@@ -142,7 +142,6 @@ int inflateMemory(unsigned char *const in, const unsigned int inLength,
}
}
while (ret != Z_STREAM_END);
-// assert(strm.avail_in == 0);
outLength = bufferSize - strm.avail_out;
(void) inflateEnd(&strm);
@@ -374,8 +373,8 @@ Map *MapReader::readMap(XmlNodePtr node, const std::string &path)
}
else if (objType == "SPAWN")
{
-// map->addPortal(_("Spawn: ") + objName, MapItem::PORTAL,
-// objX, objY, objW, objH);
+// map->addPortal(_("Spawn: ") + objName, MapItem::PORTAL,
+// objX, objY, objW, objH);
}
else if (objType == "MUSIC")
{
@@ -693,7 +692,6 @@ void MapReader::readLayer(const XmlNodePtr node, Map *const map)
// There can be only one data element
break;
}
-
}
Tileset *MapReader::readTileset(XmlNodePtr node, const std::string &path,
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index 969cb510d..793fd4d0d 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -69,7 +69,7 @@ void MonsterDB::load()
"offset", OLD_TMWATHENA_OFFSET);
#endif
- //iterate <monster>s
+ // iterate <monster>s
for_each_xml_child_node(monsterNode, rootNode)
{
if (!xmlNameEqual(monsterNode, "monster"))
@@ -124,7 +124,7 @@ void MonsterDB::load()
SpriteDisplay display;
- //iterate <sprite>s and <sound>s
+ // iterate <sprite>s and <sound>s
for_each_xml_child_node(spriteNode, monsterNode)
{
if (xmlNameEqual(spriteNode, "sprite"))
diff --git a/src/resources/npcdb.cpp b/src/resources/npcdb.cpp
index 9fc8ea73c..7056f1131 100644
--- a/src/resources/npcdb.cpp
+++ b/src/resources/npcdb.cpp
@@ -56,7 +56,7 @@ void NPCDB::load()
return;
}
- //iterate <npc>s
+ // iterate <npc>s
for_each_xml_child_node(npcNode, rootNode)
{
if (!xmlNameEqual(npcNode, "npc"))
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp
index 073835626..9843d5026 100644
--- a/src/resources/openglimagehelper.cpp
+++ b/src/resources/openglimagehelper.cpp
@@ -112,7 +112,7 @@ Image *OpenGLImageHelper::load(SDL_RWops *const rw, Dye const &dye)
int v[3];
v[0] = (p) & 255;
v[1] = (p >> 8) & 255;
- v[2] = (p >> 16 ) & 255;
+ v[2] = (p >> 16) & 255;
dye.update(v);
*pixels = (v[0]) | (v[1] << 8) | (v[2] << 16) | (alpha << 24);
}
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 0cff31f0a..481f74d30 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -244,8 +244,8 @@ bool ResourceManager::cleanOrphans(const bool always)
const ResourceIterator toErase = iter;
++iter;
mOrphanedResources.erase(toErase);
- delete res; // delete only after removal from list,
- // to avoid issues in recursion
+ delete res; // delete only after removal from list,
+ // to avoid issues in recursion
status = true;
}
}
@@ -912,7 +912,8 @@ void ResourceManager::deleteInstance()
{
logger->log("clean orphans start");
instance->cleanProtected();
- while (instance->cleanOrphans(true));
+ while (instance->cleanOrphans(true))
+ continue;
logger->log("clean orphans end");
ResourceIterator iter = instance->mResources.begin();
diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp
index b21f76b7f..44478d297 100644
--- a/src/resources/sdlimagehelper.cpp
+++ b/src/resources/sdlimagehelper.cpp
@@ -109,7 +109,7 @@ Image *SDLImageHelper::load(SDL_RWops *const rw, Dye const &dye)
int v[3];
v[0] = (p >> 24) & 255;
v[1] = (p >> 16) & 255;
- v[2] = (p >> 8 ) & 255;
+ v[2] = (p >> 8) & 255;
dye.update(v);
*pixels = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | alpha;
}
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index b417345fd..8420c806d 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -327,7 +327,6 @@ void SpriteDef::loadAnimation(const XmlNodePtr animationNode,
{
continue;
}
-
}
else
{
@@ -386,7 +385,7 @@ void SpriteDef::loadAnimation(const XmlNodePtr animationNode,
if (!name.empty())
animation->addGoto(name, rand);
}
- } // for frameNode
+ } // for frameNode
}
void SpriteDef::includeSprite(const XmlNodePtr includeNode)
diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp
index 4b7219e7b..5067bbcc8 100644
--- a/src/resources/wallpaper.cpp
+++ b/src/resources/wallpaper.cpp
@@ -46,7 +46,7 @@ struct WallpaperData
static bool wallpaperCompare(const WallpaperData &a, const WallpaperData &b);
static std::vector<WallpaperData> wallpaperData;
-static bool haveBackup; // Is the backup (no size given) version available?
+static bool haveBackup; // Is the backup (no size given) version available?
static std::string wallpaperPath;
static std::string wallpaperFile;
@@ -154,7 +154,7 @@ std::string Wallpaper::getWallpaper(const int width, const int height)
// Return randomly a wallpaper between vector[0] and
// vector[vector.size() - 1]
srand(static_cast<unsigned>(time(nullptr)));
- return wallPaperVector[int(static_cast<double>(
+ return wallPaperVector[static_cast<int>(static_cast<double>(
wallPaperVector.size()) * rand() / (RAND_MAX + 1.0))];
}
diff --git a/src/safeopenglgraphics.cpp b/src/safeopenglgraphics.cpp
index 8d37e5da2..613c136a5 100644
--- a/src/safeopenglgraphics.cpp
+++ b/src/safeopenglgraphics.cpp
@@ -225,7 +225,7 @@ bool SafeOpenGLGraphics::drawRescaledImage(const Image *const image, int srcX,
drawRescaledQuad(image, srcX, srcY, dstX, dstY, width, height,
desiredWidth, desiredHeight);
- if (smooth) // A basic smooth effect...
+ if (smooth) // A basic smooth effect...
{
setColorAlpha(0.2f);
drawRescaledQuad(image, srcX, srcY, dstX - 1, dstY - 1, width, height,
@@ -345,7 +345,6 @@ void SafeOpenGLGraphics::calcTile(ImageVertexes *const vert A_UNUSED,
void SafeOpenGLGraphics::drawTile(const ImageVertexes *const vert A_UNUSED)
{
-
}
void SafeOpenGLGraphics::updateScreen()
@@ -619,4 +618,4 @@ void SafeOpenGLGraphics::restoreColor()
mByteColor = mColor;
}
-#endif // USE_OPENGL
+#endif // USE_OPENGL
diff --git a/src/spellshortcut.cpp b/src/spellshortcut.cpp
index 5a3dd6eda..ffcc4ca49 100644
--- a/src/spellshortcut.cpp
+++ b/src/spellshortcut.cpp
@@ -62,7 +62,6 @@ void SpellShortcut::load()
{
mItems[k++] = (*i)->getId();
}
-
}
unsigned int SpellShortcut::getSpellsCount() const
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index bd6e103fb..167bbb17f 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -109,13 +109,13 @@ int StatusEffect::blockEffectIndexToEffectIndex(const int blockIndex)
StatusEffect *StatusEffect::getStatusEffect(const int index,
const bool enabling)
{
- //+++ need check
+ // +++ need check
return statusEffects[enabling][index];
}
StatusEffect *StatusEffect::getStunEffect(const int index, const bool enabling)
{
- //+++ need check
+ // +++ need check
return stunEffects[enabling][index];
}
diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp
index 22867e29c..9e18f9e27 100644
--- a/src/utils/copynpaste.cpp
+++ b/src/utils/copynpaste.cpp
@@ -228,9 +228,6 @@ CantGetPasteboardItemIdentifier:
CantGetPasteboardItemCount:
fprintf(stderr, "Cannot copy clipboard, CantGetPasteboardItemCount!\n");
return false;
-//PasteboardOutOfSync:
-// fprintf(stderr, "Cannot copy clipboard, PasteboardOutOfSync!\n");
-// return false;
}
bool getClipBoard(char* text /* out */, const int bufSize)