Add clang-tidy config and CMake/CI support.

This commit is contained in:
Pierre Wendling
2022-10-25 23:26:42 -04:00
committed by Sam Lantinga
parent 5fded632d6
commit fa8fba3812
6 changed files with 211 additions and 6 deletions

View File

@@ -223,8 +223,7 @@ void Cocoa_VideoQuit(_THIS)
}
/* This function assumes that it's called from within an autorelease pool */
NSImage *
Cocoa_CreateImage(SDL_Surface *surface)
NSImage *Cocoa_CreateImage(SDL_Surface *surface)
{
SDL_Surface *converted;
NSBitmapImageRep *imgrep;
@@ -254,7 +253,7 @@ Cocoa_CreateImage(SDL_Surface *surface)
/* Copy the pixels */
pixels = [imgrep bitmapData];
SDL_memcpy(pixels, converted->pixels, converted->h * converted->pitch);
SDL_memcpy(pixels, converted->pixels, (size_t)converted->h * converted->pitch);
SDL_DestroySurface(converted);
/* Premultiply the alpha channel */