Codechange: Use null pointer literal instead of the NULL macro

This commit is contained in:
Henry Wilson
2019-04-10 22:07:06 +01:00
committed by Michael Lutz
parent 3b4f224c0b
commit 7c8e7c6b6e
463 changed files with 5674 additions and 5674 deletions

View File

@@ -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++;