diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-04-10 22:07:06 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2019-04-10 23:22:20 +0200 |
commit | 7c8e7c6b6e16d4a26259a676db32d8776b99817e (patch) | |
tree | 99f134b7e66367cf11e10bc5061896eab4a3264f /src/blitter/8bpp_optimized.cpp | |
parent | 3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff) | |
download | openttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz |
Codechange: Use null pointer literal instead of the NULL macro
Diffstat (limited to 'src/blitter/8bpp_optimized.cpp')
-rw-r--r-- | src/blitter/8bpp_optimized.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/blitter/8bpp_optimized.cpp b/src/blitter/8bpp_optimized.cpp index 0f07e7c7b..21bca67e1 100644 --- a/src/blitter/8bpp_optimized.cpp +++ b/src/blitter/8bpp_optimized.cpp @@ -167,7 +167,7 @@ Sprite *Blitter_8bppOptimized::Encode(const SpriteLoader::Sprite *sprite, Alloca uint trans = 0; uint pixels = 0; uint last_colour = 0; - byte *count_dst = NULL; + byte *count_dst = nullptr; /* Store the scaled image */ const SpriteLoader::CommonPixel *src = &sprite[i].data[y * sprite[i].width]; @@ -176,11 +176,11 @@ Sprite *Blitter_8bppOptimized::Encode(const SpriteLoader::Sprite *sprite, Alloca uint colour = src++->m; if (last_colour == 0 || colour == 0 || pixels == 255) { - if (count_dst != NULL) { + if (count_dst != nullptr) { /* Write how many non-transparent bytes we get */ *count_dst = pixels; pixels = 0; - count_dst = NULL; + count_dst = nullptr; } /* As long as we find transparency bytes, keep counting */ if (colour == 0 && trans != 255) { @@ -206,7 +206,7 @@ Sprite *Blitter_8bppOptimized::Encode(const SpriteLoader::Sprite *sprite, Alloca } } - if (count_dst != NULL) *count_dst = pixels; + if (count_dst != nullptr) *count_dst = pixels; /* Write line-ending */ *dst = 0; dst++; |