mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-02 05:39:20 +00:00
@@ -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)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user