summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-06 20:19:20 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-06 20:19:20 +0300
commit030beaba34912a9249b9219b43c7bdc1359859e6 (patch)
tree40e4cef8856bdc9e3401eed98dc69a27c758dca2 /src/resources
parentaaacae5e2907e21ff7c0505fd4e48442ac809136 (diff)
downloadplus-030beaba34912a9249b9219b43c7bdc1359859e6.tar.gz
plus-030beaba34912a9249b9219b43c7bdc1359859e6.tar.bz2
plus-030beaba34912a9249b9219b43c7bdc1359859e6.tar.xz
plus-030beaba34912a9249b9219b43c7bdc1359859e6.zip
Fix code style.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/dye/dyepalette_replaceaoglcolor.cpp2
-rw-r--r--src/resources/map/map.cpp2
-rw-r--r--src/resources/map/maplayer.cpp6
-rw-r--r--src/resources/map/maplayer_unittest.cc4
-rw-r--r--src/resources/map/speciallayer.h4
5 files changed, 4 insertions, 14 deletions
diff --git a/src/resources/dye/dyepalette_replaceaoglcolor.cpp b/src/resources/dye/dyepalette_replaceaoglcolor.cpp
index 0b87d675b..16b54a666 100644
--- a/src/resources/dye/dyepalette_replaceaoglcolor.cpp
+++ b/src/resources/dye/dyepalette_replaceaoglcolor.cpp
@@ -54,8 +54,6 @@ void DyePalette::replaceAOGLColorDefault(uint32_t *restrict pixels,
#include "resources/dye/dyepalette_replaceaoglcolor_default.hpp"
}
-
-
#ifdef SIMD_SUPPORTED
/*
static void print256(const char *const text, const __m256i &val);
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp
index c4a4e7fa8..6070a137b 100644
--- a/src/resources/map/map.cpp
+++ b/src/resources/map/map.cpp
@@ -963,7 +963,7 @@ Path Map::findPath(const int startX, const int startY,
? basicCost : basicCost2);
/* Demote an arbitrary direction to speed pathfinding by
- adding a defect
+ adding a defect
Important: as long as the total defect along any path is
less than the basicCost, the pathfinder will still find one
of the shortest paths! */
diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp
index 0780cd8d1..74d5cacde 100644
--- a/src/resources/map/maplayer.cpp
+++ b/src/resources/map/maplayer.cpp
@@ -170,17 +170,13 @@ void MapLayer::draw(Graphics *const graphics,
}
const int x32 = x * mapTileSize;
- int c = 0;
const Image *const img = tilePtr->image;
const int px = x32 + dx;
const int py = py0 - img->mBounds.h;
if (mSpecialFlag ||
img->mBounds.h <= mapTileSize)
{
- // here need not draw over player position
- c = tilePtr->count;
-
- if (c == 0)
+ if (tilePtr->count == 0)
{
graphics->drawImage(img, px, py);
}
diff --git a/src/resources/map/maplayer_unittest.cc b/src/resources/map/maplayer_unittest.cc
index 184afce1d..2cfe7a0f5 100644
--- a/src/resources/map/maplayer_unittest.cc
+++ b/src/resources/map/maplayer_unittest.cc
@@ -528,8 +528,6 @@ TEST_CASE("MapLayer updateCache")
Image *const img2 = new Image(32, 32);
Image *const img3 = new Image(32, 32);
MapLayer *layer = nullptr;
- int width;
- int nextTile;
SECTION("simple 1")
{
@@ -893,8 +891,6 @@ TEST_CASE("MapLayer updateConditionTiles")
Image *const img1 = new Image(32, 32);
Map *map = nullptr;
MapLayer *layer = nullptr;
- int width;
- int nextTile;
SECTION("simple 1")
{
diff --git a/src/resources/map/speciallayer.h b/src/resources/map/speciallayer.h
index d71f1dab3..f418aec7c 100644
--- a/src/resources/map/speciallayer.h
+++ b/src/resources/map/speciallayer.h
@@ -68,8 +68,8 @@ class SpecialLayer final : public MemoryCounter
private:
const std::string mName;
- MapItem **mTiles __attribute__((packed));
- int *mCache __attribute__((packed));
+ MapItem **mTiles;
+ int *mCache;
int mWidth;
int mHeight;
};