mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
Pointer as bool (libsdl-org#7214)
This commit is contained in:
parent
23db971681
commit
d8600f717e
371 changed files with 2448 additions and 2442 deletions
|
|
@ -43,7 +43,7 @@ int main(int argc, char **argv)
|
|||
|
||||
/* Initialize test framework */
|
||||
state = SDLTest_CommonCreateState(argv, 0);
|
||||
if (state == NULL) {
|
||||
if (!state) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
if (SDL_NumHaptics() > 0) {
|
||||
/* We'll just use index or the first force feedback device found */
|
||||
if (name == NULL) {
|
||||
if (!name) {
|
||||
i = (index != -1) ? index : 0;
|
||||
}
|
||||
/* Try to find matching device */
|
||||
|
|
@ -106,7 +106,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
haptic = SDL_HapticOpen(i);
|
||||
if (haptic == NULL) {
|
||||
if (!haptic) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to create the haptic device: %s\n",
|
||||
SDL_GetError());
|
||||
return 1;
|
||||
|
|
@ -297,7 +297,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
/* Quit */
|
||||
if (haptic != NULL) {
|
||||
if (haptic) {
|
||||
SDL_HapticClose(haptic);
|
||||
}
|
||||
SDL_Quit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue