mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-04 10:57:40 +00:00
use SDL_InvalidParamError or SDL_assert instead of custom SDL_SetError
This commit is contained in:
parent
4a17612bff
commit
ebdd536676
36 changed files with 109 additions and 123 deletions
|
@ -99,7 +99,7 @@ SDL_CondSignal_generic(SDL_cond * _cond)
|
|||
{
|
||||
SDL_cond_generic *cond = (SDL_cond_generic *)_cond;
|
||||
if (!cond) {
|
||||
return SDL_SetError("Passed a NULL condition variable");
|
||||
return SDL_InvalidParamError("cond");
|
||||
}
|
||||
|
||||
/* If there are waiting threads not already signalled, then
|
||||
|
@ -124,7 +124,7 @@ SDL_CondBroadcast_generic(SDL_cond * _cond)
|
|||
{
|
||||
SDL_cond_generic *cond = (SDL_cond_generic *)_cond;
|
||||
if (!cond) {
|
||||
return SDL_SetError("Passed a NULL condition variable");
|
||||
return SDL_InvalidParamError("cond");
|
||||
}
|
||||
|
||||
/* If there are waiting threads not already signalled, then
|
||||
|
@ -181,7 +181,7 @@ SDL_CondWaitTimeout_generic(SDL_cond * _cond, SDL_mutex * mutex, Uint32 ms)
|
|||
int retval;
|
||||
|
||||
if (!cond) {
|
||||
return SDL_SetError("Passed a NULL condition variable");
|
||||
return SDL_InvalidParamError("cond");
|
||||
}
|
||||
|
||||
/* Obtain the protection mutex, and increment the number of waiters.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue