mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 15:50:00 -06:00
Fix all -Wwrite-strings warnings
This commit is contained in:
@ -32,7 +32,7 @@ static char *runSavePanel(NSWindow *parent, NSSavePanel *s)
|
||||
return filename;
|
||||
}
|
||||
|
||||
char *uiOpenFile(uiWindow *parent, char* filter, char* initpath)
|
||||
char *uiOpenFile(uiWindow *parent, const char* filter, const char* initpath)
|
||||
{
|
||||
NSOpenPanel *o;
|
||||
|
||||
@ -46,7 +46,7 @@ char *uiOpenFile(uiWindow *parent, char* filter, char* initpath)
|
||||
return runSavePanel(windowWindow(parent), o);
|
||||
}
|
||||
|
||||
char *uiSaveFile(uiWindow *parent, char* filter, char* initpath)
|
||||
char *uiSaveFile(uiWindow *parent, const char* filter, const char* initpath)
|
||||
{
|
||||
NSSavePanel *s;
|
||||
|
||||
|
@ -283,8 +283,8 @@ _UI_EXTERN uiMenuItem *uiMenuAppendSubmenu(uiMenu *m, uiMenu* child);
|
||||
_UI_EXTERN void uiMenuAppendSeparator(uiMenu *m);
|
||||
_UI_EXTERN uiMenu *uiNewMenu(const char *name);
|
||||
|
||||
_UI_EXTERN char *uiOpenFile(uiWindow *parent, char* filter, char* initpath);
|
||||
_UI_EXTERN char *uiSaveFile(uiWindow *parent, char* filter, char* initpath);
|
||||
_UI_EXTERN char *uiOpenFile(uiWindow *parent, const char* filter, const char* initpath);
|
||||
_UI_EXTERN char *uiSaveFile(uiWindow *parent, const char* filter, const char* initpath);
|
||||
_UI_EXTERN void uiMsgBox(uiWindow *parent, const char *title, const char *description);
|
||||
_UI_EXTERN void uiMsgBoxError(uiWindow *parent, const char *title, const char *description);
|
||||
|
||||
|
@ -163,7 +163,7 @@ uiDrawBitmap* uiDrawNewBitmap(uiDrawContext* c, int width, int height)
|
||||
|
||||
void uiDrawBitmapUpdate(uiDrawBitmap* bmp, const void* data)
|
||||
{
|
||||
unsigned char* src = data;
|
||||
const unsigned char* src = data;
|
||||
unsigned char* dst = cairo_image_surface_get_data(bmp->bmp);
|
||||
|
||||
if (bmp->Stride == bmp->Width*4)
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#define windowWindow(w) ((w)?(GTK_WINDOW(uiControlHandle(uiControl(w)))):NULL)
|
||||
|
||||
static char *filedialog(GtkWindow *parent, GtkFileChooserAction mode, const gchar *confirm, char* filter, char* initpath)
|
||||
static char *filedialog(GtkWindow *parent, GtkFileChooserAction mode, const gchar *confirm, const char* filter, const char* initpath)
|
||||
{
|
||||
GtkWidget *fcd;
|
||||
GtkFileChooser *fc;
|
||||
@ -83,12 +83,12 @@ static char *filedialog(GtkWindow *parent, GtkFileChooserAction mode, const gcha
|
||||
return filename;
|
||||
}
|
||||
|
||||
char *uiOpenFile(uiWindow *parent, char* filter, char* initpath)
|
||||
char *uiOpenFile(uiWindow *parent, const char* filter, const char* initpath)
|
||||
{
|
||||
return filedialog(windowWindow(parent), GTK_FILE_CHOOSER_ACTION_OPEN, "_Open", filter, initpath);
|
||||
}
|
||||
|
||||
char *uiSaveFile(uiWindow *parent, char* filter, char* initpath)
|
||||
char *uiSaveFile(uiWindow *parent, const char* filter, const char* initpath)
|
||||
{
|
||||
return filedialog(windowWindow(parent), GTK_FILE_CHOOSER_ACTION_SAVE, "_Save", filter, initpath);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#define windowHWND(w) (w ? (HWND) uiControlHandle(uiControl(w)) : NULL)
|
||||
|
||||
char *commonItemDialog(HWND parent, REFCLSID clsid, REFIID iid, char* filter, char* initpath, FILEOPENDIALOGOPTIONS optsadd)
|
||||
char *commonItemDialog(HWND parent, REFCLSID clsid, REFIID iid, const char* filter, const char* initpath, FILEOPENDIALOGOPTIONS optsadd)
|
||||
{
|
||||
IFileDialog *d = NULL;
|
||||
FILEOPENDIALOGOPTIONS opts;
|
||||
@ -108,7 +108,7 @@ out:
|
||||
return name;
|
||||
}
|
||||
|
||||
char *uiOpenFile(uiWindow *parent, char* filter, char* initpath)
|
||||
char *uiOpenFile(uiWindow *parent, const char* filter, const char* initpath)
|
||||
{
|
||||
char *res;
|
||||
|
||||
@ -121,7 +121,7 @@ char *uiOpenFile(uiWindow *parent, char* filter, char* initpath)
|
||||
return res;
|
||||
}
|
||||
|
||||
char *uiSaveFile(uiWindow *parent, char* filter, char* initpath)
|
||||
char *uiSaveFile(uiWindow *parent, const char* filter, const char* initpath)
|
||||
{
|
||||
char *res;
|
||||
|
||||
|
Reference in New Issue
Block a user