summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-02-04 03:55:27 +0300
committerAndrei Karas <akaras@inbox.ru>2017-02-04 03:55:27 +0300
commit8532b189d874c719f8bda0fcf8d2e427cb2b2863 (patch)
treefc350b64457fb482710d8981ff0fe710c8994ad1
parent819681f76bdabe1f4fc379007956d8118aa39228 (diff)
downloadmanaplus-8532b189d874c719f8bda0fcf8d2e427cb2b2863.tar.gz
manaplus-8532b189d874c719f8bda0fcf8d2e427cb2b2863.tar.bz2
manaplus-8532b189d874c719f8bda0fcf8d2e427cb2b2863.tar.xz
manaplus-8532b189d874c719f8bda0fcf8d2e427cb2b2863.zip
Fix code style.
-rw-r--r--src/net/eathena/buysellrecv.cpp2
-rw-r--r--src/net/eathena/cashshoprecv.cpp2
-rw-r--r--src/net/eathena/marketrecv.cpp2
-rw-r--r--src/resources/db/unitsdb.cpp4
-rw-r--r--src/resources/map/maplayer.cpp6
5 files changed, 6 insertions, 10 deletions
diff --git a/src/net/eathena/buysellrecv.cpp b/src/net/eathena/buysellrecv.cpp
index 2984eac97..4b111dee9 100644
--- a/src/net/eathena/buysellrecv.cpp
+++ b/src/net/eathena/buysellrecv.cpp
@@ -60,7 +60,7 @@ void BuySellRecv::processNpcBuy(Net::MessageIn &msg)
if (npcId != BeingTypeId_zero)
{
- const BeingInfo *info = NPCDB::get(npcId);
+ const BeingInfo *const info = NPCDB::get(npcId);
if (info)
currency = info->getCurrency();
else
diff --git a/src/net/eathena/cashshoprecv.cpp b/src/net/eathena/cashshoprecv.cpp
index 01c727913..deafbec28 100644
--- a/src/net/eathena/cashshoprecv.cpp
+++ b/src/net/eathena/cashshoprecv.cpp
@@ -63,7 +63,7 @@ void CashShopRecv::processCashShopOpen(Net::MessageIn &msg)
if (npcId != BeingTypeId_zero)
{
- const BeingInfo *info = NPCDB::get(npcId);
+ const BeingInfo *const info = NPCDB::get(npcId);
if (info)
currency = info->getCurrency();
else
diff --git a/src/net/eathena/marketrecv.cpp b/src/net/eathena/marketrecv.cpp
index 82775acff..cfe7aa4c8 100644
--- a/src/net/eathena/marketrecv.cpp
+++ b/src/net/eathena/marketrecv.cpp
@@ -60,7 +60,7 @@ void MarketRecv::processMarketOpen(Net::MessageIn &msg)
if (npcId != BeingTypeId_zero)
{
- const BeingInfo *info = NPCDB::get(npcId);
+ const BeingInfo *const info = NPCDB::get(npcId);
if (info)
currency = info->getCurrency();
else
diff --git a/src/resources/db/unitsdb.cpp b/src/resources/db/unitsdb.cpp
index 465b44c8f..37c516390 100644
--- a/src/resources/db/unitsdb.cpp
+++ b/src/resources/db/unitsdb.cpp
@@ -102,7 +102,7 @@ void UnitsDb::loadUnits()
ud.conversion = 1.0;
ud.mix = false;
- UnitLevel bu = {"¤", 1, 0, ""};
+ const UnitLevel bu = {"¤", 1, 0, ""};
ud.levels.push_back(bu);
defaultCurrency = ud;
@@ -175,7 +175,7 @@ static void loadCurrencies(XmlNodePtr parentNode)
if (xmlNameEqual(node, "unit"))
{
const std::string name = XML::getProperty(node, "name", "");
- if (name == "")
+ if (name.empty())
{
reportAlways("Error: unknown currency name.");
continue;
diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp
index deaeab9de..57e49b3eb 100644
--- a/src/resources/map/maplayer.cpp
+++ b/src/resources/map/maplayer.cpp
@@ -40,8 +40,6 @@
#include "resources/map/metatile.h"
#include "resources/map/speciallayer.h"
-#include "utils/checkutils.h"
-
#include "debug.h"
MapLayer::MapLayer(const std::string &name,
@@ -558,16 +556,14 @@ void MapLayer::drawFringe(Graphics *const graphics,
for (int x = x0; x < endX; x++, tilePtr++)
{
const int x32 = x * mapTileSize;
- int c = 0;
const Image *const img = tilePtr->image;
if (mSpecialFlag ||
img->mBounds.h <= mapTileSize)
{
const int px = x32 + dx;
const int py = py0 - img->mBounds.h;
- c = tilePtr->count;
- if (c == 0)
+ if (tilePtr->count == 0)
{
graphics->drawImage(img, px, py);
}