Mark plat_vidapi() argument as const and remove the NULL
* plat_vidapi() accepts char pointer, which never gets modifed later on. Mark it as const. * In src/config.c, va_name is initialized as NULL, however, plat_vidapi_name() never returns a NULL pointer, nor it was initialized under a condition branch. Removing NULL, might save one instruction, which requires zeroing the register before setting its initial value.
This commit is contained in:
@@ -153,7 +153,7 @@ extern uint32_t plat_get_ticks(void);
|
||||
extern void plat_delay_ms(uint32_t count);
|
||||
extern void plat_pause(int p);
|
||||
extern void plat_mouse_capture(int on);
|
||||
extern int plat_vidapi(char *name);
|
||||
extern int plat_vidapi(const char *name);
|
||||
extern char *plat_vidapi_name(int api);
|
||||
extern void plat_resize(int x, int y, int monitor_index);
|
||||
extern void plat_resize_request(int x, int y, int monitor_index);
|
||||
|
||||
Reference in New Issue
Block a user