Clang-Tidy fixes (#6725)

This commit is contained in:
Pierre Wendling
2022-12-01 16:07:03 -05:00
committed by GitHub
parent c2ce44bead
commit 3c501b963d
184 changed files with 1312 additions and 1154 deletions

View File

@@ -691,7 +691,7 @@ void SDL_FreeRW(SDL_RWops *area)
void *
SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)
{
const int FILE_CHUNK_SIZE = 1024;
static const Sint64 FILE_CHUNK_SIZE = 1024;
Sint64 size;
size_t size_read, size_total;
void *data = NULL, *newdata;

View File

@@ -42,7 +42,7 @@ FILE *SDL_OpenFPFromBundleOrFallback(const char *file, const char *mode)
NSString *full_path_with_file_to_try;
/* If the file mode is writable, skip all the bundle stuff because generally the bundle is read-only. */
if (strcmp("r", mode) && strcmp("rb", mode)) {
if (SDL_strchr(mode, 'r') == NULL) {
return fopen(file, mode);
}