summaryrefslogtreecommitdiff
path: root/src/compoundsprite.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-07 19:34:52 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-07 19:34:52 +0300
commit9e83411f7e4147d09af5a5006888dcc187ea0ef8 (patch)
treec084bdf8afabc6220779645dcb5dbf71af6a151f /src/compoundsprite.cpp
parentbc7d91cc0c9c0f6dcad01d612932c6899afb5514 (diff)
downloadmanaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.gz
manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.bz2
manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.xz
manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.zip
Fix some warnings under gcc 4.7.
Diffstat (limited to 'src/compoundsprite.cpp')
-rw-r--r--src/compoundsprite.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compoundsprite.cpp b/src/compoundsprite.cpp
index ceab9a149..cda178aeb 100644
--- a/src/compoundsprite.cpp
+++ b/src/compoundsprite.cpp
@@ -166,7 +166,7 @@ void CompoundSprite::drawSpritesSDL(Graphics* graphics,
int CompoundSprite::getWidth() const
{
- Sprite *base = NULL;
+ Sprite *base = nullptr;
SpriteConstIterator it, it_end;
for (it = begin(), it_end = end(); it != it_end; ++it)
@@ -183,7 +183,7 @@ int CompoundSprite::getWidth() const
int CompoundSprite::getHeight() const
{
- Sprite *base = NULL;
+ Sprite *base = nullptr;
SpriteConstIterator it, it_end;
for (it = begin(), it_end = end(); it != it_end; ++it)
@@ -271,7 +271,7 @@ void CompoundSprite::setSprite(int layer, Sprite* sprite)
void CompoundSprite::removeSprite(int layer)
{
// Skip if it won't change anything
- if (at(layer) == NULL)
+ if (at(layer) == nullptr)
return;
delete at(layer);
@@ -299,7 +299,7 @@ void CompoundSprite::ensureSize(size_t layerCount)
if (size() >= layerCount)
return;
- resize(layerCount, NULL);
+ resize(layerCount, nullptr);
}
/**
@@ -387,7 +387,7 @@ void CompoundSprite::redraw() const
BUFFER_WIDTH, BUFFER_HEIGHT, 32, rmask, gmask, bmask, amask);
SDL_SetAlpha(surface, 0, SDL_ALPHA_OPAQUE);
- SDL_BlitSurface(surface, NULL, surfaceA, NULL);
+ SDL_BlitSurface(surface, nullptr, surfaceA, nullptr);
delete mImage;
delete mAlphaImage;