Code style: changed "sizeof foo" to "sizeof(foo)" (thanks @sezero!)

This commit is contained in:
Sam Lantinga
2023-03-09 15:10:00 -08:00
parent ad95c93bf4
commit c6443d86c9
57 changed files with 176 additions and 179 deletions

View File

@@ -82,12 +82,12 @@ draw_modes_menu(SDL_Window *window, SDL_Renderer *renderer, SDL_FRect viewport)
y += lineHeight;
SDL_strlcpy(text, "Click on a mode to set it with SDL_SetWindowFullscreenMode", sizeof text);
SDL_strlcpy(text, "Click on a mode to set it with SDL_SetWindowFullscreenMode", sizeof(text));
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
SDLTest_DrawString(renderer, x, y, text);
y += lineHeight;
SDL_strlcpy(text, "Press Ctrl+Enter to toggle SDL_WINDOW_FULLSCREEN", sizeof text);
SDL_strlcpy(text, "Press Ctrl+Enter to toggle SDL_WINDOW_FULLSCREEN", sizeof(text));
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
SDLTest_DrawString(renderer, x, y, text);
y += lineHeight;
@@ -109,7 +109,7 @@ draw_modes_menu(SDL_Window *window, SDL_Renderer *renderer, SDL_FRect viewport)
SDL_FRect cell_rect;
const SDL_DisplayMode *mode = modes[j];
(void)SDL_snprintf(text, sizeof text, "%s mode %d: %dx%d@%gHz",
(void)SDL_snprintf(text, sizeof(text), "%s mode %d: %dx%d@%gHz",
SDL_GetDisplayName(display_id),
j, mode->pixel_w, mode->pixel_h, mode->refresh_rate);