diff options
author | Campbell Barton <campbell@blender.org> | 2022-08-12 04:12:37 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-08-12 04:13:07 +0300 |
commit | fe63124c3eb26dd2bcbe18ee678ea942cb12b4bf (patch) | |
tree | b857326ad6e47a26418ee04162a5966f1dec13c9 /intern/ghost/test | |
parent | 7347252f0f7b79fdbcb253c64ae7430bff8b59aa (diff) |
Cleanup: add missing braces in GHOST
Diffstat (limited to 'intern/ghost/test')
-rw-r--r-- | intern/ghost/test/gears/GHOST_Test.cpp | 9 | ||||
-rw-r--r-- | intern/ghost/test/multitest/MultiTest.c | 25 |
2 files changed, 21 insertions, 13 deletions
diff --git a/intern/ghost/test/gears/GHOST_Test.cpp b/intern/ghost/test/gears/GHOST_Test.cpp index 5a43543d163..f5ef2527d75 100644 --- a/intern/ghost/test/gears/GHOST_Test.cpp +++ b/intern/ghost/test/gears/GHOST_Test.cpp @@ -559,10 +559,12 @@ bool Application::processEvent(GHOST_IEvent *event) break; case GHOST_kKeyS: // toggle mono and stereo - if (stereo) + if (stereo) { stereo = false; - else + } + else { stereo = true; + } break; case GHOST_kKeyT: @@ -680,8 +682,9 @@ int main(int /*argc*/, char ** /*argv*/) if (lresult == ERROR_SUCCESS) printf("Successfully set value for key\n"); regkey.Close(); - if (lresult == ERROR_SUCCESS) + if (lresult == ERROR_SUCCESS) { printf("Successfully closed key\n"); + } // regkey.Write("2"); } #endif // WIN32 diff --git a/intern/ghost/test/multitest/MultiTest.c b/intern/ghost/test/multitest/MultiTest.c index 157e4f1b0f2..99b88dfb525 100644 --- a/intern/ghost/test/multitest/MultiTest.c +++ b/intern/ghost/test/multitest/MultiTest.c @@ -179,37 +179,44 @@ static void mainwindow_do_key(MainWindow *mw, GHOST_TKey key, int press) { switch (key) { case GHOST_kKeyC: - if (press) + if (press) { GHOST_SetCursorShape(mw->win, (GHOST_TStandardCursor)(rand() % (GHOST_kStandardCursorNumCursors))); + } break; case GHOST_kKeyLeftBracket: - if (press) + if (press) { GHOST_SetCursorVisibility(mw->win, 0); + } break; case GHOST_kKeyRightBracket: - if (press) + if (press) { GHOST_SetCursorVisibility(mw->win, 1); + } break; case GHOST_kKeyE: - if (press) + if (press) { multitestapp_toggle_extra_window(mw->app); + } break; case GHOST_kKeyQ: - if (press) + if (press) { multitestapp_exit(mw->app); + } break; case GHOST_kKeyT: - if (press) + if (press) { mainwindow_log(mw, "TextTest~|`hello`\"world\",<>/"); + } break; case GHOST_kKeyR: if (press) { int i; mainwindow_log(mw, "Invalidating window 10 times"); - for (i = 0; i < 10; i++) + for (i = 0; i < 10; i++) { GHOST_InvalidateWindow(mw->win); + } } break; case GHOST_kKeyF11: @@ -328,9 +335,7 @@ MainWindow *mainwindow_new(MultiTestApp *app) return mw; } - else { - return NULL; - } + return NULL; } void mainwindow_free(MainWindow *mw) |