Add error returns to void functions that can fail/set errors.
This takes care of the last set of void functions that could potentially be shifted to instead return an int indicating success and setting an error in case of an error.
This commit is contained in:
committed by
Sam Lantinga
parent
b305d9e3c0
commit
3bd737d44c
@@ -513,13 +513,13 @@ void SDL_Quit(void)
|
||||
}
|
||||
|
||||
/* Get the library version number */
|
||||
void SDL_GetVersion(SDL_version *ver)
|
||||
int SDL_GetVersion(SDL_version *ver)
|
||||
{
|
||||
static SDL_bool check_hint = SDL_TRUE;
|
||||
static SDL_bool legacy_version = SDL_FALSE;
|
||||
|
||||
if (ver == NULL) {
|
||||
return;
|
||||
return SDL_InvalidParamError("ver");
|
||||
}
|
||||
|
||||
SDL_VERSION(ver);
|
||||
@@ -534,6 +534,7 @@ void SDL_GetVersion(SDL_version *ver)
|
||||
ver->patch = ver->minor;
|
||||
ver->minor = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Get the library source revision */
|
||||
|
||||
Reference in New Issue
Block a user