mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-17 18:28:28 +00:00
Removed unnecessary const-qualifiers in src and test files
This commit is contained in:
parent
b8e8dcaa9a
commit
020fb6889c
13 changed files with 16 additions and 16 deletions
|
@ -341,7 +341,7 @@ bool SDL_DBus_CallVoidMethod(const char *node, const char *path, const char *int
|
|||
return result;
|
||||
}
|
||||
|
||||
bool SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *property, const int expectedtype, void *result)
|
||||
bool SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *property, int expectedtype, void *result)
|
||||
{
|
||||
bool retval = false;
|
||||
|
||||
|
@ -358,7 +358,7 @@ bool SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const char *node,
|
|||
return retval;
|
||||
}
|
||||
|
||||
bool SDL_DBus_QueryProperty(const char *node, const char *path, const char *interface, const char *property, const int expectedtype, void *result)
|
||||
bool SDL_DBus_QueryProperty(const char *node, const char *path, const char *interface, const char *property, int expectedtype, void *result)
|
||||
{
|
||||
return SDL_DBus_QueryPropertyOnConnection(dbus.session_conn, node, path, interface, property, expectedtype, result);
|
||||
}
|
||||
|
|
|
@ -94,12 +94,12 @@ extern SDL_DBusContext *SDL_DBus_GetContext(void);
|
|||
// These use the built-in Session connection.
|
||||
extern bool SDL_DBus_CallMethod(const char *node, const char *path, const char *interface, const char *method, ...);
|
||||
extern bool SDL_DBus_CallVoidMethod(const char *node, const char *path, const char *interface, const char *method, ...);
|
||||
extern bool SDL_DBus_QueryProperty(const char *node, const char *path, const char *interface, const char *property, const int expectedtype, void *result);
|
||||
extern bool SDL_DBus_QueryProperty(const char *node, const char *path, const char *interface, const char *property, int expectedtype, void *result);
|
||||
|
||||
// These use whatever connection you like.
|
||||
extern bool SDL_DBus_CallMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...);
|
||||
extern bool SDL_DBus_CallVoidMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...);
|
||||
extern bool SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *property, const int expectedtype, void *result);
|
||||
extern bool SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *property, int expectedtype, void *result);
|
||||
|
||||
extern void SDL_DBus_ScreensaverTickle(void);
|
||||
extern bool SDL_DBus_ScreensaverInhibit(bool inhibit);
|
||||
|
|
|
@ -97,7 +97,7 @@ char *convert_filters(const SDL_DialogFileFilter *filters, int nfilters,
|
|||
return combined;
|
||||
}
|
||||
|
||||
char *convert_filter(const SDL_DialogFileFilter filter, NameTransform ntf,
|
||||
char *convert_filter(SDL_DialogFileFilter filter, NameTransform ntf,
|
||||
const char *prefix, const char *separator,
|
||||
const char *suffix, const char *ext_prefix,
|
||||
const char *ext_separator, const char *ext_suffix)
|
||||
|
|
|
@ -41,7 +41,7 @@ char *convert_filters(const SDL_DialogFileFilter *filters, int nfilters,
|
|||
|
||||
// Converts one filter into a single string.
|
||||
// <prefix>[filter name]<separator>[filter extension list]<suffix>
|
||||
char *convert_filter(const SDL_DialogFileFilter filter, NameTransform ntf,
|
||||
char *convert_filter(SDL_DialogFileFilter filter, NameTransform ntf,
|
||||
const char *prefix, const char *separator,
|
||||
const char *suffix, const char *ext_prefix,
|
||||
const char *ext_separator, const char *ext_suffix);
|
||||
|
|
|
@ -888,7 +888,7 @@ void SDL_SetModState(SDL_Keymod modstate)
|
|||
}
|
||||
|
||||
// Note that SDL_ToggleModState() is not a public API. SDL_SetModState() is.
|
||||
void SDL_ToggleModState(const SDL_Keymod modstate, const bool toggle)
|
||||
void SDL_ToggleModState(SDL_Keymod modstate, bool toggle)
|
||||
{
|
||||
SDL_Keyboard *keyboard = &SDL_keyboard;
|
||||
if (toggle) {
|
||||
|
|
|
@ -82,6 +82,6 @@ extern void SDL_SendEditingTextCandidates(char **candidates, int num_candidates,
|
|||
extern void SDL_QuitKeyboard(void);
|
||||
|
||||
// Toggle on or off pieces of the keyboard mod state.
|
||||
extern void SDL_ToggleModState(const SDL_Keymod modstate, const bool toggle);
|
||||
extern void SDL_ToggleModState(SDL_Keymod modstate, bool toggle);
|
||||
|
||||
#endif // SDL_keyboard_c_h_
|
||||
|
|
|
@ -354,7 +354,7 @@ bool SDL_FlushRenderer(SDL_Renderer *renderer)
|
|||
return true;
|
||||
}
|
||||
|
||||
void *SDL_AllocateRenderVertices(SDL_Renderer *renderer, const size_t numbytes, const size_t alignment, size_t *offset)
|
||||
void *SDL_AllocateRenderVertices(SDL_Renderer *renderer, size_t numbytes, size_t alignment, size_t *offset)
|
||||
{
|
||||
const size_t needed = renderer->vertex_data_used + numbytes + alignment;
|
||||
const size_t current_offset = renderer->vertex_data_used;
|
||||
|
|
|
@ -359,7 +359,7 @@ extern SDL_BlendOperation SDL_GetBlendModeAlphaOperation(SDL_BlendMode blendMode
|
|||
/* drivers call this during their Queue*() methods to make space in a array that are used
|
||||
for a vertex buffer during RunCommandQueue(). Pointers returned here are only valid until
|
||||
the next call, because it might be in an array that gets realloc()'d. */
|
||||
extern void *SDL_AllocateRenderVertices(SDL_Renderer *renderer, const size_t numbytes, const size_t alignment, size_t *offset);
|
||||
extern void *SDL_AllocateRenderVertices(SDL_Renderer *renderer, size_t numbytes, size_t alignment, size_t *offset);
|
||||
|
||||
// Let the video subsystem destroy a renderer without making its pointer invalid.
|
||||
extern void SDL_DestroyRendererWithoutFreeing(SDL_Renderer *renderer);
|
||||
|
|
|
@ -79,7 +79,7 @@ char *SDL_UCS4ToUTF8(Uint32 codepoint, char *dst)
|
|||
|
||||
|
||||
// this expects `from` and `to` to be UTF-32 encoding!
|
||||
int SDL_CaseFoldUnicode(const Uint32 from, Uint32 *to)
|
||||
int SDL_CaseFoldUnicode(Uint32 from, Uint32 *to)
|
||||
{
|
||||
// !!! FIXME: since the hashtable is static, maybe we should binary
|
||||
// !!! FIXME: search it instead of walking the whole bucket.
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
// just a few special pieces right now.
|
||||
|
||||
// this expects `from` to be a Unicode codepoint, and `to` to point to AT LEAST THREE Uint32s.
|
||||
int SDL_CaseFoldUnicode(const Uint32 from, Uint32 *to);
|
||||
int SDL_CaseFoldUnicode(Uint32 from, Uint32 *to);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -402,7 +402,7 @@ static void X11_XInput2NormalizePenAxes(const X11_PenHandle *pen, float *coords)
|
|||
}
|
||||
|
||||
void X11_PenAxesFromValuators(const X11_PenHandle *pen,
|
||||
const double *input_values, const unsigned char *mask, const int mask_len,
|
||||
const double *input_values, const unsigned char *mask, int mask_len,
|
||||
float axis_values[SDL_PEN_AXIS_COUNT])
|
||||
{
|
||||
for (int i = 0; i < SDL_PEN_AXIS_COUNT; i++) {
|
||||
|
|
|
@ -55,7 +55,7 @@ typedef struct X11_PenHandle
|
|||
|
||||
// Converts XINPUT2 valuators into pen axis information, including normalisation.
|
||||
extern void X11_PenAxesFromValuators(const X11_PenHandle *pen,
|
||||
const double *input_values, const unsigned char *mask, const int mask_len,
|
||||
const double *input_values, const unsigned char *mask, int mask_len,
|
||||
float axis_values[SDL_PEN_AXIS_COUNT]);
|
||||
|
||||
// Add a pen (if this function's further checks validate it).
|
||||
|
|
|
@ -731,7 +731,7 @@ static Texture *CreateTexture(const char *fname)
|
|||
return tex;
|
||||
}
|
||||
|
||||
static Thing *CreateLogicalDeviceThing(Thing *parent, const SDL_AudioDeviceID which, const float x, const float y);
|
||||
static Thing *CreateLogicalDeviceThing(Thing *parent, SDL_AudioDeviceID which, float x, float y);
|
||||
|
||||
static void DeviceThing_ondrag(Thing *thing, int button, float x, float y)
|
||||
{
|
||||
|
@ -903,7 +903,7 @@ static void LogicalDeviceThing_onmousewheel(Thing *thing, float y)
|
|||
SDL_SetAudioDeviceGain(thing->data.logdev.devid, thing->meter);
|
||||
}
|
||||
|
||||
static Thing *CreateLogicalDeviceThing(Thing *parent, const SDL_AudioDeviceID which, const float x, const float y)
|
||||
static Thing *CreateLogicalDeviceThing(Thing *parent, SDL_AudioDeviceID which, float x, float y)
|
||||
{
|
||||
static const ThingType can_be_dropped_onto[] = { THING_TRASHCAN, THING_NULL };
|
||||
Thing *physthing = ((parent->what == THING_LOGDEV) || (parent->what == THING_LOGDEV_RECORDING)) ? parent->data.logdev.physdev : parent;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue