Cleanup add brace (#6545)
* Add braces after if conditions
* More add braces after if conditions
* Add braces after while() conditions
* Fix compilation because of macro being modified
* Add braces to for loop
* Add braces after if/goto
* Move comments up
* Remove extra () in the 'return ...;' statements
* More remove extra () in the 'return ...;' statements
* More remove extra () in the 'return ...;' statements after merge
* Fix inconsistent patterns are xxx == NULL vs !xxx
* More "{}" for "if() break;" and "if() continue;"
* More "{}" after if() short statement
* More "{}" after "if () return;" statement
* More fix inconsistent patterns are xxx == NULL vs !xxx
* Revert some modificaion on SDL_RLEaccel.c
* SDL_RLEaccel: no short statement
* Cleanup 'if' where the bracket is in a new line
* Cleanup 'while' where the bracket is in a new line
* Cleanup 'for' where the bracket is in a new line
* Cleanup 'else' where the bracket is in a new line
This commit is contained in:
@@ -135,7 +135,7 @@ Draw(DrawState *s)
|
||||
SDL_RenderGetViewport(s->renderer, &viewport);
|
||||
|
||||
target = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, viewport.w, viewport.h);
|
||||
if (!target) {
|
||||
if (target == NULL) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create render target texture: %s\n", SDL_GetError());
|
||||
return SDL_FALSE;
|
||||
}
|
||||
@@ -181,12 +181,17 @@ loop()
|
||||
SDLTest_CommonEvent(state, &event, &done);
|
||||
}
|
||||
for (i = 0; i < state->num_windows; ++i) {
|
||||
if (state->windows[i] == NULL)
|
||||
if (state->windows[i] == NULL) {
|
||||
continue;
|
||||
}
|
||||
if (test_composite) {
|
||||
if (!DrawComposite(&drawstates[i])) done = 1;
|
||||
if (!DrawComposite(&drawstates[i])) {
|
||||
done = 1;
|
||||
}
|
||||
} else {
|
||||
if (!Draw(&drawstates[i])) done = 1;
|
||||
if (!Draw(&drawstates[i])) {
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef __EMSCRIPTEN__
|
||||
@@ -208,7 +213,7 @@ main(int argc, char *argv[])
|
||||
|
||||
/* Initialize test framework */
|
||||
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
|
||||
if (!state) {
|
||||
if (state == NULL) {
|
||||
return 1;
|
||||
}
|
||||
for (i = 1; i < argc;) {
|
||||
|
||||
Reference in New Issue
Block a user