summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-24 21:09:00 +0000
committerrubidium <rubidium@openttd.org>2009-05-24 21:09:00 +0000
commit168ae6f7e2e87d3050c39bbb03148924751370a3 (patch)
treef231a8b93fcf344d126a8d3aa3ded9803200ca67 /src/vehicle.cpp
parent0d99b6c71cd096599b4805d230483f3e4e958af1 (diff)
downloadopenttd-168ae6f7e2e87d3050c39bbb03148924751370a3.tar.xz
(svn r16422) -Codechange: use const_cast for removing const and warn when const is (accidentally?) removed using C-style casts.
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 73887577b..5b54c5b2a 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -1396,7 +1396,7 @@ static SpriteID GetEngineColourMap(EngineID engine_type, CompanyID company, Engi
* map else it's returned as-is. */
if (!HasBit(callback, 14)) {
/* Update cache */
- if (v != NULL) ((Vehicle*)v)->colourmap = map;
+ if (v != NULL) const_cast<Vehicle *>(v)->colourmap = map;
return map;
}
}
@@ -1412,7 +1412,7 @@ static SpriteID GetEngineColourMap(EngineID engine_type, CompanyID company, Engi
if (twocc) map += livery->colour2 * 16;
/* Update cache */
- if (v != NULL) ((Vehicle*)v)->colourmap = map;
+ if (v != NULL) const_cast<Vehicle *>(v)->colourmap = map;
return map;
}