Skip to content

Commit

Permalink
Readability: change some pointer parameter to be pointer to const
Browse files Browse the repository at this point in the history
  • Loading branch information
1bsyl committed Oct 30, 2019
1 parent 3d100df commit d4a67e2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/libm/k_rem_pio2.c
Expand Up @@ -149,7 +149,7 @@ one = 1.0,
two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */

int32_t attribute_hidden __kernel_rem_pio2(double *x, double *y, int e0, int nx, const unsigned int prec, const int32_t *ipio2)
int32_t attribute_hidden __kernel_rem_pio2(const double *x, double *y, int e0, int nx, const unsigned int prec, const int32_t *ipio2)
{
int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
double z,fw,f[20],fq[20],q[20];
Expand Down
2 changes: 1 addition & 1 deletion src/libm/math_private.h
Expand Up @@ -221,7 +221,7 @@ __ieee754_sqrt(double)
extern double __kernel_sin(double, double, int) attribute_hidden;
extern double __kernel_cos(double, double) attribute_hidden;
extern double __kernel_tan(double, double, int) attribute_hidden;
extern int32_t __kernel_rem_pio2(double *, double *, int, int, const unsigned int,
extern int32_t __kernel_rem_pio2(const double *, double *, int, int, const unsigned int,
const int32_t *) attribute_hidden;

#endif /* _MATH_PRIVATE_H_ */
4 changes: 2 additions & 2 deletions src/test/SDL_test_md5.c
Expand Up @@ -56,7 +56,7 @@
#include "SDL_test.h"

/* Forward declaration of static helper function */
static void SDLTest_Md5Transform(MD5UINT4 * buf, MD5UINT4 * in);
static void SDLTest_Md5Transform(MD5UINT4 * buf, const MD5UINT4 * in);

static unsigned char MD5PADDING[64] = {
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Expand Down Expand Up @@ -229,7 +229,7 @@ void SDLTest_Md5Final(SDLTest_Md5Context * mdContext)

/* Basic MD5 step. Transforms buf based on in.
*/
static void SDLTest_Md5Transform(MD5UINT4 * buf, MD5UINT4 * in)
static void SDLTest_Md5Transform(MD5UINT4 * buf, const MD5UINT4 * in)
{
MD5UINT4 a = buf[0], b = buf[1], c = buf[2], d = buf[3];

Expand Down
6 changes: 3 additions & 3 deletions src/video/SDL_RLEaccel.c
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/video/x11/SDL_x11messagebox.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/video/x11/SDL_x11xinput2.c
Expand Up @@ -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;
Expand Down

0 comments on commit d4a67e2

Please sign in to comment.