Readability: change some pointer parameter to be pointer to const

This commit is contained in:
Sylvain Becker
2019-10-30 16:06:51 +01:00
parent 3d100df36f
commit d4a67e2541
6 changed files with 9 additions and 9 deletions

View File

@@ -1237,19 +1237,19 @@ RLEAlphaSurface(SDL_Surface * surface)
}
static Uint32
getpix_8(Uint8 * srcbuf)
getpix_8(const Uint8 * srcbuf)
{
return *srcbuf;
}
static Uint32
getpix_16(Uint8 * srcbuf)
getpix_16(const Uint8 * srcbuf)
{
return *(Uint16 *) srcbuf;
}
static Uint32
getpix_24(Uint8 * srcbuf)
getpix_24(const Uint8 * srcbuf)
{
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
return srcbuf[0] + (srcbuf[1] << 8) + (srcbuf[2] << 16);

View File

@@ -625,7 +625,7 @@ X11_MessageBoxDraw( SDL_MessageBoxDataX11 *data, GC ctx )
}
static Bool
X11_MessageBoxEventTest(Display *display, XEvent *event, XPointer arg)
X11_MessageBoxEventTest(Display *display, XEvent *event, const XPointer arg)
{
const SDL_MessageBoxDataX11 *data = (const SDL_MessageBoxDataX11 *) arg;
return ((event->xany.display == data->display) && (event->xany.window == data->window)) ? True : False;

View File

@@ -42,7 +42,7 @@ static int xinput2_multitouch_supported = 0;
* this extension */
static int xinput2_opcode;
static void parse_valuators(const double *input_values,unsigned char *mask,int mask_len,
static void parse_valuators(const double *input_values, const unsigned char *mask,int mask_len,
double *output_values,int output_values_len) {
int i = 0,z = 0;
int top = mask_len * 8;