PINK: Use nullptr

Using clang-tidy modernize-use-nullptr
This commit is contained in:
Orgad Shaneh 2021-11-13 23:40:36 +02:00 committed by Filippos Karapetis
parent 9394b5301f
commit 635377951e
5 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ uint16 CelDecoder::getTransparentColourIndex() const {
const Graphics::Surface *CelDecoder::getCurrentFrame() const {
const CelVideoTrack *track = (const CelVideoTrack *)getTrack(0);
if (!track)
return 0;
return nullptr;
return track->getCurrentFrame();
}

View File

@ -29,7 +29,7 @@
static const PlainGameDescriptor pinkGames[] = {
{"peril", "The Pink Panther: Passport to Peril"},
{"pokus", "The Pink Panther: Hokus Pokus Pink"},
{0, 0}
{nullptr, nullptr}
};
#include "pink/detection_tables.h"

View File

@ -106,7 +106,7 @@ Director::Director(PinkEngine *vm)
_wm->setMenuDelay(250000);
_wm->setEngineRedrawCallback(this, redrawCallback);
_textFont = NULL;
_textFont = nullptr;
#ifdef USE_FREETYPE2
_textFont = Graphics::loadTTFFontFromArchive("system.ttf", 16);

View File

@ -51,7 +51,7 @@ void GamePage::toConsole() const {
void GamePage::deserialize(Archive &archive) {
Page::deserialize(archive);
_module = static_cast<Module *>(archive.readObject());
assert(dynamic_cast<Module *>(_module) != 0);
assert(dynamic_cast<Module *>(_module) != nullptr);
}
void GamePage::load(Archive &archive) {

View File

@ -32,7 +32,7 @@ WalkShortestPath::WalkShortestPath(WalkMgr *manager)
WalkLocation *WalkShortestPath::next(WalkLocation *start, WalkLocation *destination) {
if (start == destination)
return nullptr;
add(start, 0.0, 0);
add(start, 0.0, nullptr);
while (build() != destination) {}
return getNearestNeighbor(destination);
}