(svn r16422) -Codechange: use const_cast for removing const and warn when const is (accidentally?) removed using C-style casts.

This commit is contained in:
rubidium
2009-05-24 21:09:00 +00:00
parent c496a3e014
commit 2832d69272
12 changed files with 18 additions and 20 deletions

View File

@@ -144,7 +144,7 @@ static RefitList *BuildRefitList(const Vehicle *v)
uint max_lines = 256;
RefitOption *refit = CallocT<RefitOption>(max_lines);
RefitList *list = CallocT<RefitList>(1);
Vehicle *u = (Vehicle*)v;
Vehicle *u = const_cast<Vehicle *>(v);
uint num_lines = 0;
uint i;