Made return value descriptions more consistent across the API

This commit is contained in:
Sam Lantinga
2024-07-18 00:30:33 -07:00
parent d73c7311d5
commit 217330a7b3
24 changed files with 194 additions and 175 deletions

View File

@@ -95,8 +95,7 @@ typedef enum SDL_TimeFormat
* format, may be NULL.
* \param timeFormat a pointer to the SDL_TimeFormat to hold the returned time
* format, may be NULL.
* \returns 0 on success or -1 on error; call SDL_GetError() for more
* information.
* \returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*/
@@ -107,8 +106,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetDateTimeLocalePreferences(SDL_DateFormat
* Jan 1, 1970 in Universal Coordinated Time (UTC).
*
* \param ticks the SDL_Time to hold the returned tick count.
* \returns 0 on success or -1 on error; call SDL_GetError() for more
* information.
* \returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*/
@@ -123,8 +121,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetCurrentTime(SDL_Time *ticks);
* \param localTime the resulting SDL_DateTime will be expressed in local time
* if true, otherwise it will be in Universal Coordinated
* Time (UTC).
* \returns 0 on success or -1 on error; call SDL_GetError() for more
* information.
* \returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*/
@@ -138,8 +135,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime
*
* \param dt the source SDL_DateTime.
* \param ticks the resulting SDL_Time.
* \returns 0 on success or -1 on error; call SDL_GetError() for more
* information.
* \returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*/
@@ -181,8 +177,7 @@ extern SDL_DECLSPEC SDL_Time SDLCALL SDL_TimeFromWindows(Uint32 dwLowDateTime, U
*
* \param year the year.
* \param month the month [1-12].
* \returns the number of days in the requested month, otherwise -1; call
* SDL_GetError() for more information.
* \returns the number of days in the requested month or a negative error code on failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*/
@@ -194,8 +189,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetDaysInMonth(int year, int month);
* \param year the year component of the date.
* \param month the month component of the date.
* \param day the day component of the date.
* \returns the day of year [0-365] if the date is valid, otherwise -1; call
* SDL_GetError() for more information.
* \returns the day of year [0-365] if the date is valid or a negative error code on failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*/
@@ -207,8 +201,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetDayOfYear(int year, int month, int day);
* \param year the year component of the date.
* \param month the month component of the date.
* \param day the day component of the date.
* \returns a value between 0 and 6 (0 being Sunday) if the date is valid,
* otherwise -1; call SDL_GetError() for more information.
* \returns a value between 0 and 6 (0 being Sunday) if the date is valid or a negative error code on failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*/