diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-24 18:28:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-24 21:06:51 +0300 |
commit | a306ecf96736779b08d1de7ec994d3d741d5dc61 (patch) | |
tree | 5a64809354d2c5f672a34fc9578975ab76920b5b /src/navigationmanager.cpp | |
parent | 6053e0797465a15da30b8d645c8ac7c95b596c69 (diff) | |
download | mv-a306ecf96736779b08d1de7ec994d3d741d5dc61.tar.gz mv-a306ecf96736779b08d1de7ec994d3d741d5dc61.tar.bz2 mv-a306ecf96736779b08d1de7ec994d3d741d5dc61.tar.xz mv-a306ecf96736779b08d1de7ec994d3d741d5dc61.zip |
fix code style.
Diffstat (limited to 'src/navigationmanager.cpp')
-rw-r--r-- | src/navigationmanager.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/navigationmanager.cpp b/src/navigationmanager.cpp index 38dd0f718..46d930efc 100644 --- a/src/navigationmanager.cpp +++ b/src/navigationmanager.cpp @@ -23,12 +23,11 @@ #include "map.h" #include "walklayer.h" -#include "resources/resource.h" - static const int walkMask = (Map::BLOCKMASK_WALL | Map::BLOCKMASK_AIR | Map::BLOCKMASK_WATER); -namespace { +namespace +{ struct Cell { Cell(const int x0, const int y0) : @@ -50,7 +49,7 @@ NavigationManager::~NavigationManager() { } -Resource *NavigationManager::loadWalkLayer(Map *const map) +Resource *NavigationManager::loadWalkLayer(const Map *const map) { if (!map) return nullptr; @@ -62,12 +61,12 @@ Resource *NavigationManager::loadWalkLayer(Map *const map) WalkLayer *const walkLayer = new WalkLayer(width, height); const MetaTile *const tiles = map->getMetaTiles(); - int *data = walkLayer->getData(); + int *const data = walkLayer->getData(); int x = 0; int y = 0; int num = 1; - while(findWalkableTile(x, y, width, height,tiles, data)) + while (findWalkableTile(x, y, width, height, tiles, data)) { fillNum(x, y, width, height, num, tiles, data); num ++; |