mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-23 22:41:56 +00:00
thread: code style
This commit is contained in:
parent
38c281fbc0
commit
461a38ff1a
12 changed files with 35 additions and 38 deletions
|
|
@ -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)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue