From 168ae6f7e2e87d3050c39bbb03148924751370a3 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 24 May 2009 21:09:00 +0000 Subject: (svn r16422) -Codechange: use const_cast for removing const and warn when const is (accidentally?) removed using C-style casts. --- src/newgrf_engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/newgrf_engine.cpp') diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index 60529f09c..a85d2f376 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -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(GRV(object)); /* This function must only be called when processing triggers -- any * other time is an error. */ -- cgit v1.2.3-54-g00ecf