Cambiados NULL por nullptr

This commit is contained in:
2022-09-25 21:22:59 +02:00
parent 6637ba9f10
commit 6493b73f4f
9 changed files with 34 additions and 30 deletions

View File

@@ -366,6 +366,7 @@ void Game::init()
mPowerBallCounter = 0;
mCoffeeMachineEnabled = false;
mPostFade = 0;
mLastStageReached = 0;
if (mDemo.enabled)
{
@@ -596,13 +597,13 @@ bool Game::loadScoreFile()
SDL_RWops *file = SDL_RWFromFile(p.c_str(), "r+b");
// El fichero no existe
if (file == NULL)
if (file == nullptr)
{
printf("Warning: Unable to open %s file\n", filename.c_str());
// Creamos el fichero para escritura
file = SDL_RWFromFile(p.c_str(), "w+b");
if (file != NULL)
if (file != nullptr)
{
printf("New file (%s) created!\n", filename.c_str());
@@ -656,13 +657,13 @@ bool Game::loadDemoFile()
SDL_RWops *file = SDL_RWFromFile(p.c_str(), "r+b");
// El fichero no existe
if (file == NULL)
if (file == nullptr)
{
printf("Warning: Unable to open %s file\n", filename.c_str());
// Creamos el fichero para escritura
file = SDL_RWFromFile(p.c_str(), "w+b");
if (file != NULL)
if (file != nullptr)
{
printf("New file (%s) created!\n", filename.c_str());
@@ -710,7 +711,7 @@ bool Game::saveScoreFile()
const std::string p = mFileList[0];
const std::string filename = p.substr(p.find_last_of("\\/") + 1);
SDL_RWops *file = SDL_RWFromFile(p.c_str(), "w+b");
if (file != NULL)
if (file != nullptr)
{
// Guardamos los datos
for (int i = 0; i < TOTAL_SCORE_DATA; ++i)
@@ -739,7 +740,7 @@ bool Game::saveDemoFile()
if (mDemo.recording)
{
SDL_RWops *file = SDL_RWFromFile(p.c_str(), "w+b");
if (file != NULL)
if (file != nullptr)
{
// Guardamos los datos
for (int i = 0; i < TOTAL_DEMO_DATA; ++i)