summaryrefslogtreecommitdiff
path: root/src/navigationmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-24 18:28:47 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-24 21:06:51 +0300
commita306ecf96736779b08d1de7ec994d3d741d5dc61 (patch)
tree5a64809354d2c5f672a34fc9578975ab76920b5b /src/navigationmanager.cpp
parent6053e0797465a15da30b8d645c8ac7c95b596c69 (diff)
downloadplus-a306ecf96736779b08d1de7ec994d3d741d5dc61.tar.gz
plus-a306ecf96736779b08d1de7ec994d3d741d5dc61.tar.bz2
plus-a306ecf96736779b08d1de7ec994d3d741d5dc61.tar.xz
plus-a306ecf96736779b08d1de7ec994d3d741d5dc61.zip
fix code style.
Diffstat (limited to 'src/navigationmanager.cpp')
-rw-r--r--src/navigationmanager.cpp11
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 ++;