thread: code style

This commit is contained in:
pionere
2022-11-29 17:30:03 +01:00
committed by Sam Lantinga
parent 38c281fbc0
commit 461a38ff1a
12 changed files with 35 additions and 38 deletions

View File

@@ -58,7 +58,7 @@ extern "C"
void
SDL_DestroyCond(SDL_cond * cond)
{
if (cond) {
if (cond != NULL) {
delete cond;
}
}
@@ -114,11 +114,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");
}
@@ -131,7 +131,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)
);