summaryrefslogtreecommitdiff
path: root/src/vehiclelist.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-09 06:52:08 +0000
committerrubidium <rubidium@openttd.org>2013-11-09 06:52:08 +0000
commit85d4f8d65c891b162405b66b0949cf9c5998078f (patch)
tree1326872285097e1e213712efdde64c7bf061c7ef /src/vehiclelist.cpp
parent14b8f6e594c8a80c220b58fa8ce7d33d8c509b3f (diff)
downloadopenttd-85d4f8d65c891b162405b66b0949cf9c5998078f.tar.xz
(svn r25959) -Fix: clang warnings; either because type safety was assumed, or because technically the wrong value was tested
Diffstat (limited to 'src/vehiclelist.cpp')
-rw-r--r--src/vehiclelist.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vehiclelist.cpp b/src/vehiclelist.cpp
index b15f05571..e74f28f0f 100644
--- a/src/vehiclelist.cpp
+++ b/src/vehiclelist.cpp
@@ -21,9 +21,10 @@ uint32 VehicleListIdentifier::Pack()
{
byte c = this->company == OWNER_NONE ? 0xF : (byte)this->company;
assert(c < (1 << 4));
- assert(this->type < (1 << 3));
assert(this->vtype < (1 << 2));
assert(this->index < (1 << 20));
+ assert(this->type < VLT_END);
+ assert_compile(VLT_END <= (1 << 3));
return c << 28 | this->type << 23 | this->vtype << 26 | this->index;
}