Additional cleanup exposed by building with a C++ compiler

This commit is contained in:
Sam Lantinga
2024-08-25 21:32:29 -07:00
parent f08ac438ed
commit 00c409cff8
26 changed files with 84 additions and 120 deletions

View File

@@ -110,7 +110,7 @@ SDL_AppResult SDL_InitMainCallbacks(int argc, char* argv[], SDL_AppInit_func app
}
}
return SDL_AtomicGet(&apprc);
return (SDL_AppResult)SDL_AtomicGet(&apprc);
}
SDL_AppResult SDL_IterateMainCallbacks(bool pump_events)
@@ -120,11 +120,11 @@ SDL_AppResult SDL_IterateMainCallbacks(bool pump_events)
}
SDL_DispatchMainCallbackEvents();
SDL_AppResult rc = SDL_AtomicGet(&apprc);
SDL_AppResult rc = (SDL_AppResult)SDL_AtomicGet(&apprc);
if (rc == SDL_APP_CONTINUE) {
rc = SDL_main_iteration_callback(SDL_main_appstate);
if (!SDL_AtomicCompareAndSwap(&apprc, SDL_APP_CONTINUE, rc)) {
rc = SDL_AtomicGet(&apprc); // something else already set a quit result, keep that.
rc = (SDL_AppResult)SDL_AtomicGet(&apprc); // something else already set a quit result, keep that.
}
}
return rc;