thread: code style

(cherry picked from commit 461a38ff1a)
This commit is contained in:
pionere
2022-11-29 17:30:03 +01:00
committed by Sam Lantinga
parent 8cda5102fc
commit 0b7a9a8e9f
12 changed files with 43 additions and 42 deletions

View File

@@ -59,7 +59,7 @@ extern "C"
void
SDL_DestroyCond(SDL_cond * cond)
{
if (cond) {
if (cond != NULL) {
delete cond;
}
}
@@ -115,11 +115,11 @@ extern "C"
int
SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms)
{
if (!cond) {
if (cond == NULL) {
return SDL_InvalidParamError("cond");
}
if (!mutex) {
if (mutex == NULL) {
return SDL_InvalidParamError("mutex");
}
@@ -132,7 +132,7 @@ SDL_CondWaitTimeout(SDL_cond * cond, SDL_mutex * mutex, Uint32 ms)
cpp_lock.release();
return 0;
} else {
auto wait_result = cond->cpp_cond.wait_for (
auto wait_result = cond->cpp_cond.wait_for(
cpp_lock,
std::chrono::duration<Uint32, std::milli>(ms)
);