(svn r23198) -Codechange: introduce a free that takes const pointers so we don't need to cast to void/non-const before being able to free

This commit is contained in:
rubidium
2011-11-12 13:00:29 +00:00
parent d61b90ac6f
commit 7fd1e1df81
21 changed files with 78 additions and 60 deletions

View File

@@ -448,7 +448,7 @@ struct GameOptionsWindow : Window {
if (_game_mode == GM_MENU) {
const char *name = T::GetSet(index)->name;
free(const_cast<char *>(T::ini_set));
free(T::ini_set);
T::ini_set = strdup(name);
T::SetSet(name);