summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-28 20:49:24 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-28 20:49:24 +0200
commitafece3f6acd9a7a4a009b73883d4c2d27ac1b8ce (patch)
treec74d0f6e0a0000274ece2d663ed90a83459191a0 /src/resources
parent8d3b46c492cade8504fafedbd6c00b6a39968388 (diff)
downloadplus-afece3f6acd9a7a4a009b73883d4c2d27ac1b8ce.tar.gz
plus-afece3f6acd9a7a4a009b73883d4c2d27ac1b8ce.tar.bz2
plus-afece3f6acd9a7a4a009b73883d4c2d27ac1b8ce.tar.xz
plus-afece3f6acd9a7a4a009b73883d4c2d27ac1b8ce.zip
Fix code style and some new compilation warnings.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/action.cpp7
-rw-r--r--src/resources/mapreader.cpp3
-rw-r--r--src/resources/resource.h2
3 files changed, 9 insertions, 3 deletions
diff --git a/src/resources/action.cpp b/src/resources/action.cpp
index b8cfde611..9781d6514 100644
--- a/src/resources/action.cpp
+++ b/src/resources/action.cpp
@@ -42,9 +42,14 @@ Animation *Action::getAnimation(int direction) const
if (i == mAnimations.end())
{
if (direction == DIRECTION_UPLEFT || direction == DIRECTION_UPRIGHT)
+ {
direction = DIRECTION_UP;
- else if (direction == DIRECTION_DOWNLEFT || direction == DIRECTION_DOWNRIGHT)
+ }
+ else if (direction == DIRECTION_DOWNLEFT
+ || direction == DIRECTION_DOWNRIGHT)
+ {
direction = DIRECTION_DOWN;
+ }
i = mAnimations.find(direction);
// When the given direction is not available, return the first one.
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index d990d2cb0..a2e81ae07 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -438,7 +438,8 @@ void MapReader::readLayer(xmlNodePtr node, Map *map)
if (encoding == "base64")
{
- if (!compression.empty() && compression != "gzip" && compression != "zlib")
+ if (!compression.empty() && compression != "gzip"
+ && compression != "zlib")
{
logger->log1("Warning: only gzip layer"
" compression supported!");
diff --git a/src/resources/resource.h b/src/resources/resource.h
index 89fcc9de7..d2f8ca313 100644
--- a/src/resources/resource.h
+++ b/src/resources/resource.h
@@ -62,7 +62,7 @@ class Resource
/**
* Return refCount for this resource.
*/
- unsigned getRefCount()
+ unsigned getRefCount() const
{ return mRefCount; }
protected: