From 37a412ea40a48e94834861708cc6b7525de731e7 Mon Sep 17 00:00:00 2001 From: Sara Date: Sun, 26 Oct 2025 21:17:43 +0100 Subject: [PATCH] chore(style): clarified InitSDL error conditions --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 93ed603..06413e3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -67,11 +67,11 @@ void InitSDL() { SDL_LogError(SDL_LOG_CATEGORY_ERROR, "SDL_Init failed: %s", SDL_GetError()); exit(1); } - if ((window = SDL_CreateWindow("Window", screenWidth, screenHeight, sdlInitFlags)) == nullptr) { + if (!(window = SDL_CreateWindow("Window", screenWidth, screenHeight, sdlInitFlags))) { SDL_LogError(SDL_LOG_CATEGORY_ERROR, "SDL_CreateWindow failed: %s", SDL_GetError()); exit(2); } - if ((renderer = SDL_CreateRenderer(window, NULL)) == nullptr) { + if (!(renderer = SDL_CreateRenderer(window, NULL))) { SDL_LogError(SDL_LOG_CATEGORY_ERROR, "SDL_CreateRenderer failed: %s", SDL_GetError()); exit(3); }