TTimo / GtkRadiant

The open source, cross platform level editor for idtech games
http://icculus.org/gtkradiant/
Other
582 stars 152 forks source link

Fix warning g_strdown is deprecated #529

Closed Pan7 closed 6 years ago

Pan7 commented 6 years ago

tools/quake3/common/vfs.c:148:3: warning: 'g_strdown' is deprecated [-Wdeprecated-declarations] g_strdown( filename_inzip ); ^ /opt/local/include/glib-2.0/glib/gstrfuncs.h:207:23: note: 'g_strdown' has been explicitly marked deprecated here gchar g_strdown (gchar string); ^ tools/quake3/common/vfs.c:239:2: warning: 'g_strdown' is deprecated [-Wdeprecated-declarations] g_strdown( fixed ); ^ /opt/local/include/glib-2.0/glib/gstrfuncs.h:207:23: note: 'g_strdown' has been explicitly marked deprecated here gchar g_strdown (gchar string); ^ tools/quake3/common/vfs.c:299:2: warning: 'g_strdown' is deprecated [-Wdeprecated-declarations] g_strdown( fixed ); ^ /opt/local/include/glib-2.0/glib/gstrfuncs.h:207:23: note: 'g_strdown' has been explicitly marked deprecated here gchar g_strdown (gchar string);

See https://github.com/TTimo/GtkRadiant/issues/467 See https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-ascii-strdown There is also g_utf8_strdown that should considered be used in the future https://developer.gnome.org/glib/stable/glib-Unicode-Manipulation.html#g-utf8-strdown

illwieckz commented 6 years ago

While importing this fix in NetRadiant tree, @TimePath noticed that g_ascii_strdown returns a new string while g_strdown modified in-place, see his comment.