Removed some uneeded 'unsigned'

This commit is contained in:
Sylvain 2023-01-31 20:46:09 +01:00
parent d58693928d
commit fb3b27f891
No known key found for this signature in database
GPG key ID: 5F87E02E5BC0939E
32 changed files with 45 additions and 45 deletions

View file

@ -120,7 +120,7 @@ typedef enum
typedef struct SDL_AssertData
{
int always_ignore;
unsigned int trigger_count;
int trigger_count;
const char *condition;
const char *filename;
int linenum;

View file

@ -181,9 +181,9 @@ typedef struct SDL_AudioSpec
{
int freq; /**< DSP frequency -- samples per second */
SDL_AudioFormat format; /**< Audio data format */
Uint8 channels; /**< Number of channels: 1 mono, 2 stereo */
Sint8 channels; /**< Number of channels: 1 mono, 2 stereo */
Uint8 silence; /**< Audio buffer silence value (calculated) */
Uint16 samples; /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */
Sint16 samples; /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */
Uint16 padding; /**< Necessary for some compile environments */
Uint32 size; /**< Audio buffer size in bytes (calculated) */
SDL_AudioCallback callback; /**< Callback that feeds the audio device (NULL to use SDL_QueueAudio()). */

View file

@ -308,7 +308,7 @@ typedef struct SDL_Palette
{
int ncolors;
SDL_Color *colors;
Uint32 version;
int version;
int refcount;
} SDL_Palette;

View file

@ -79,7 +79,7 @@ typedef struct SDL_RendererInfo
{
const char *name; /**< The name of the renderer */
Uint32 flags; /**< Supported ::SDL_RendererFlags */
Uint32 num_texture_formats; /**< The number of available texture formats */
Sint32 num_texture_formats; /**< The number of available texture formats */
Uint32 texture_formats[16]; /**< The available texture formats */
int max_texture_width; /**< The maximum texture width */
int max_texture_height; /**< The maximum texture height */

View file

@ -66,7 +66,7 @@ extern "C" {
*
* \sa SDL_DestroyWindow
*/
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title, int x, int y, int w, int h,Uint32 flags);
/**
* Return whether the given window is a shaped window.

View file

@ -50,9 +50,9 @@ extern "C" {
*/
typedef struct SDL_version
{
Uint8 major; /**< major version */
Uint8 minor; /**< minor version */
Uint8 patch; /**< update version */
Sint8 major; /**< major version */
Sint8 minor; /**< minor version */
Sint8 patch; /**< update version */
} SDL_version;
/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL

View file

@ -150,7 +150,7 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
* required extensions, SDL_FALSE will be returned instead of SDL_TRUE, to
* indicate that not all the required extensions were returned.
*
* \param pCount A pointer to an unsigned int corresponding to the number of
* \param pCount A pointer to an int corresponding to the number of
* extensions to be returned
* \param pNames NULL or a pointer to an array to be filled with required
* Vulkan instance extensions
@ -160,7 +160,7 @@ extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
*
* \sa SDL_Vulkan_CreateSurface
*/
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(unsigned int *pCount,
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(int *pCount,
const char **pNames);
/**

View file

@ -165,7 +165,7 @@ SDL_DYNAPI_PROC(SDL_Palette*,SDL_CreatePalette,(int a),(a),return)
SDL_DYNAPI_PROC(SDL_PixelFormat*,SDL_CreatePixelFormat,(Uint32 a),(a),return)
SDL_DYNAPI_PROC(SDL_Renderer*,SDL_CreateRenderer,(SDL_Window *a, const char *b, Uint32 c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_sem*,SDL_CreateSemaphore,(Uint32 a),(a),return)
SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateShapedWindow,(const char *a, unsigned int b, unsigned int c, unsigned int d, unsigned int e, Uint32 f),(a,b,c,d,e,f),return)
SDL_DYNAPI_PROC(SDL_Window*,SDL_CreateShapedWindow,(const char *a, int b, int c, int d, int e, Uint32 f),(a,b,c,d,e,f),return)
SDL_DYNAPI_PROC(SDL_Renderer*,SDL_CreateSoftwareRenderer,(SDL_Surface *a),(a),return)
SDL_DYNAPI_PROC(SDL_Surface*,SDL_CreateSurface,(int a, int b, Uint32 c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_Surface*,SDL_CreateSurfaceFrom,(void *a, int b, int c, int d, Uint32 e),(a,b,c,d,e),return)
@ -745,7 +745,7 @@ SDL_DYNAPI_PROC(int,SDL_UpdateWindowSurface,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_UpdateWindowSurfaceRects,(SDL_Window *a, const SDL_Rect *b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_UpdateYUVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f, const Uint8 *g, int h),(a,b,c,d,e,f,g,h),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_Vulkan_CreateSurface,(SDL_Window *a, VkInstance b, VkSurfaceKHR *c),(a,b,c),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_Vulkan_GetInstanceExtensions,(unsigned int *a, const char **b),(a,b),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_Vulkan_GetInstanceExtensions,(int *a, const char **b),(a,b),return)
SDL_DYNAPI_PROC(SDL_FunctionPointer,SDL_Vulkan_GetVkGetInstanceProcAddr,(void),(),return)
SDL_DYNAPI_PROC(int,SDL_Vulkan_LoadLibrary,(const char *a),(a),return)
SDL_DYNAPI_PROC(void,SDL_Vulkan_UnloadLibrary,(void),(),)

View file

@ -1177,7 +1177,7 @@ static SDL_bool IsSupportedBlendMode(SDL_Renderer *renderer, SDL_BlendMode blend
static SDL_bool IsSupportedFormat(SDL_Renderer *renderer, Uint32 format)
{
Uint32 i;
int i;
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
if (renderer->info.texture_formats[i] == format) {
@ -1189,7 +1189,7 @@ static SDL_bool IsSupportedFormat(SDL_Renderer *renderer, Uint32 format)
static Uint32 GetClosestSupportedFormat(SDL_Renderer *renderer, Uint32 format)
{
Uint32 i;
int i;
if (SDL_ISPIXELFORMAT_FOURCC(format)) {
/* Look for an exact match */
@ -1376,14 +1376,14 @@ SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *surface)
/* No alpha, but a colorkey => promote to alpha */
if (!fmt->Amask && SDL_SurfaceHasColorKey(surface)) {
if (fmt->format == SDL_PIXELFORMAT_RGB888) {
for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
if (renderer->info.texture_formats[i] == SDL_PIXELFORMAT_ARGB8888) {
format = SDL_PIXELFORMAT_ARGB8888;
break;
}
}
} else if (fmt->format == SDL_PIXELFORMAT_BGR888) {
for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
if (renderer->info.texture_formats[i] == SDL_PIXELFORMAT_ABGR8888) {
format = SDL_PIXELFORMAT_ABGR8888;
break;
@ -1392,7 +1392,7 @@ SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *surface)
}
} else {
/* Exact match would be fine */
for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
if (renderer->info.texture_formats[i] == fmt->format) {
format = fmt->format;
break;
@ -1403,7 +1403,7 @@ SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *surface)
/* Fallback, choose a valid pixel format */
if (format == SDL_PIXELFORMAT_UNKNOWN) {
format = renderer->info.texture_formats[0];
for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
if (!SDL_ISPIXELFORMAT_FOURCC(renderer->info.texture_formats[i]) &&
SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == needAlpha) {
format = renderer->info.texture_formats[i];

View file

@ -954,7 +954,7 @@ static void SDLTest_PrintRenderer(SDL_RendererInfo *info)
SDL_Log("%s\n", text);
(void)SDL_snprintf(text, sizeof text, " Texture formats (%" SDL_PRIu32 "): ", info->num_texture_formats);
for (i = 0; i < (int)info->num_texture_formats; ++i) {
for (i = 0; i < info->num_texture_formats; ++i) {
if (i > 0) {
SDL_snprintfcat(text, sizeof text, ", ");
}

View file

@ -24,7 +24,7 @@
#include "SDL_shape_internals.h"
SDL_Window *
SDL_CreateShapedWindow(const char *title, unsigned int x, unsigned int y, unsigned int w, unsigned int h, Uint32 flags)
SDL_CreateShapedWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
{
SDL_Window *result = NULL;
result = SDL_CreateWindow(title, -1000, -1000, w, h, (flags | SDL_WINDOW_BORDERLESS) & (~SDL_WINDOW_FULLSCREEN_MASK) & (~SDL_WINDOW_RESIZABLE));

View file

@ -311,7 +311,7 @@ struct SDL_VideoDevice
*/
int (*Vulkan_LoadLibrary)(_THIS, const char *path);
void (*Vulkan_UnloadLibrary)(_THIS);
SDL_bool (*Vulkan_GetInstanceExtensions)(_THIS, unsigned *count, const char **names);
SDL_bool (*Vulkan_GetInstanceExtensions)(_THIS, int *count, const char **names);
SDL_bool (*Vulkan_CreateSurface)(_THIS, SDL_Window *window, VkInstance instance, VkSurfaceKHR *surface);
/* * * */

View file

@ -4806,7 +4806,7 @@ void SDL_Vulkan_UnloadLibrary(void)
}
}
SDL_bool SDL_Vulkan_GetInstanceExtensions(unsigned *count, const char **names)
SDL_bool SDL_Vulkan_GetInstanceExtensions(int *count, const char **names)
{
if (count == NULL) {
SDL_InvalidParamError("count");

View file

@ -65,9 +65,9 @@ extern VkExtensionProperties *SDL_Vulkan_CreateInstanceExtensionsList(
/* Implements functionality of SDL_Vulkan_GetInstanceExtensions for a list of
* names passed in nameCount and names. */
extern SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount,
extern SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(int *userCount,
const char **userNames,
unsigned nameCount,
int nameCount,
const char *const *names);
/* Create a surface directly from a display connected to a physical device

View file

@ -167,13 +167,13 @@ VkExtensionProperties *SDL_Vulkan_CreateInstanceExtensionsList(
return retval;
}
SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(unsigned *userCount,
SDL_bool SDL_Vulkan_GetInstanceExtensions_Helper(int *userCount,
const char **userNames,
unsigned nameCount,
int nameCount,
const char *const *names)
{
if (userNames) {
unsigned i;
int i;
if (*userCount < nameCount) {
SDL_SetError("Output array for SDL_Vulkan_GetInstanceExtensions needs to be at least %d big", nameCount);

View file

@ -110,7 +110,7 @@ void Android_Vulkan_UnloadLibrary(_THIS)
}
SDL_bool Android_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names)
{
static const char *const extensionsForAndroid[] = {

View file

@ -37,7 +37,7 @@
int Android_Vulkan_LoadLibrary(_THIS, const char *path);
void Android_Vulkan_UnloadLibrary(_THIS);
SDL_bool Android_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names);
SDL_bool Android_Vulkan_CreateSurface(_THIS,
SDL_Window *window,

View file

@ -37,7 +37,7 @@
int Cocoa_Vulkan_LoadLibrary(_THIS, const char *path);
void Cocoa_Vulkan_UnloadLibrary(_THIS);
SDL_bool Cocoa_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names);
SDL_bool Cocoa_Vulkan_CreateSurface(_THIS,
SDL_Window *window,

View file

@ -164,7 +164,7 @@ void Cocoa_Vulkan_UnloadLibrary(_THIS)
}
SDL_bool Cocoa_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names)
{
static const char *const extensionsForCocoa[] = {

View file

@ -141,7 +141,7 @@ void KMSDRM_Vulkan_UnloadLibrary(_THIS)
/* vkCreateInstance(). */
/*********************************************************************/
SDL_bool KMSDRM_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names)
{
static const char *const extensionsForKMSDRM[] = {

View file

@ -37,7 +37,7 @@
int KMSDRM_Vulkan_LoadLibrary(_THIS, const char *path);
void KMSDRM_Vulkan_UnloadLibrary(_THIS);
SDL_bool KMSDRM_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names);
SDL_bool KMSDRM_Vulkan_CreateSurface(_THIS,
SDL_Window *window,

View file

@ -37,7 +37,7 @@
int UIKit_Vulkan_LoadLibrary(_THIS, const char *path);
void UIKit_Vulkan_UnloadLibrary(_THIS);
SDL_bool UIKit_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names);
SDL_bool UIKit_Vulkan_CreateSurface(_THIS,
SDL_Window *window,

View file

@ -170,7 +170,7 @@ void UIKit_Vulkan_UnloadLibrary(_THIS)
}
SDL_bool UIKit_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names)
{
static const char *const extensionsForUIKit[] = {

View file

@ -117,7 +117,7 @@ void VIVANTE_Vulkan_UnloadLibrary(_THIS)
}
SDL_bool VIVANTE_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names)
{
static const char *const extensionsForVivante[] = {

View file

@ -36,7 +36,7 @@
int VIVANTE_Vulkan_LoadLibrary(_THIS, const char *path);
void VIVANTE_Vulkan_UnloadLibrary(_THIS);
SDL_bool VIVANTE_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names);
SDL_bool VIVANTE_Vulkan_CreateSurface(_THIS,
SDL_Window *window,

View file

@ -116,7 +116,7 @@ void Wayland_Vulkan_UnloadLibrary(_THIS)
}
SDL_bool Wayland_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names)
{
static const char *const extensionsForWayland[] = {

View file

@ -37,7 +37,7 @@
int Wayland_Vulkan_LoadLibrary(_THIS, const char *path);
void Wayland_Vulkan_UnloadLibrary(_THIS);
SDL_bool Wayland_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names);
SDL_bool Wayland_Vulkan_CreateSurface(_THIS,
SDL_Window *window,

View file

@ -111,7 +111,7 @@ void WIN_Vulkan_UnloadLibrary(_THIS)
}
SDL_bool WIN_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names)
{
static const char *const extensionsForWin32[] = {

View file

@ -37,7 +37,7 @@
int WIN_Vulkan_LoadLibrary(_THIS, const char *path);
void WIN_Vulkan_UnloadLibrary(_THIS);
SDL_bool WIN_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names);
SDL_bool WIN_Vulkan_CreateSurface(_THIS,
SDL_Window *window,

View file

@ -141,7 +141,7 @@ void X11_Vulkan_UnloadLibrary(_THIS)
}
SDL_bool X11_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names)
{
SDL_VideoData *videoData = _this->driverdata;

View file

@ -33,7 +33,7 @@ typedef xcb_connection_t *(*PFN_XGetXCBConnection)(Display *dpy);
int X11_Vulkan_LoadLibrary(_THIS, const char *path);
void X11_Vulkan_UnloadLibrary(_THIS);
SDL_bool X11_Vulkan_GetInstanceExtensions(_THIS,
unsigned *count,
int *count,
const char **names);
SDL_bool X11_Vulkan_CreateSurface(_THIS,
SDL_Window *window,

View file

@ -220,7 +220,7 @@ static void createInstance(void)
VkApplicationInfo appInfo = { 0 };
VkInstanceCreateInfo instanceCreateInfo = { 0 };
const char **extensions = NULL;
unsigned extensionCount = 0;
int extensionCount = 0;
VkResult result;
appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;