diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-03-03 22:25:13 +0000 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2019-03-24 16:10:04 +0100 |
commit | af7d9020a15c1b1a14b3981ac73c70d2e58cc877 (patch) | |
tree | 1dcff3e01382ea3a0a4733a4637659dbbfd4bad5 /src/ground_vehicle.hpp | |
parent | 31260e66252fb4d0dda6f992520faeeb96929cfe (diff) | |
download | openttd-af7d9020a15c1b1a14b3981ac73c70d2e58cc877.tar.xz |
Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.
Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
Diffstat (limited to 'src/ground_vehicle.hpp')
-rw-r--r-- | src/ground_vehicle.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ground_vehicle.hpp b/src/ground_vehicle.hpp index 56b97875f..25106ab1c 100644 --- a/src/ground_vehicle.hpp +++ b/src/ground_vehicle.hpp @@ -92,14 +92,14 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> { void PowerChanged(); void CargoChanged(); int GetAcceleration() const; - bool IsChainInDepot() const; + bool IsChainInDepot() const override; /** * Common code executed for crashed ground vehicles * @param flooded was this vehicle flooded? * @return number of victims */ - /* virtual */ uint Crash(bool flooded) + uint Crash(bool flooded) override { /* Crashed vehicles aren't going up or down */ for (T *v = T::From(this); v != NULL; v = v->Next()) { |