mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-21 05:29:11 +00:00
(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:
@@ -416,7 +416,7 @@ static void VehicleSetTriggers(const ResolverObject *object, int triggers)
|
||||
* innocent looking function pointer cast... Currently I cannot see a
|
||||
* way of avoiding this without removing consts deep within gui code.
|
||||
*/
|
||||
Vehicle *v = (Vehicle*)GRV(object);
|
||||
Vehicle *v = const_cast<Vehicle *>(GRV(object));
|
||||
|
||||
/* This function must only be called when processing triggers -- any
|
||||
* other time is an error. */
|
||||
|
Reference in New Issue
Block a user