From 9e83411f7e4147d09af5a5006888dcc187ea0ef8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 7 Nov 2011 19:34:52 +0300 Subject: Fix some warnings under gcc 4.7. --- src/compoundsprite.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/compoundsprite.cpp') 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; -- cgit v1.2.3-60-g2f50