From 030beaba34912a9249b9219b43c7bdc1359859e6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 6 Jan 2017 20:19:20 +0300 Subject: Fix code style. --- src/resources/dye/dyepalette_replaceaoglcolor.cpp | 2 -- src/resources/map/map.cpp | 2 +- src/resources/map/maplayer.cpp | 6 +----- src/resources/map/maplayer_unittest.cc | 4 ---- src/resources/map/speciallayer.h | 4 ++-- 5 files changed, 4 insertions(+), 14 deletions(-) (limited to 'src/resources') 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; }; -- cgit v1.2.3-70-g09d2