summaryrefslogtreecommitdiff
path: root/src/vehiclelist.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2016-11-05 19:16:59 +0000
committerfrosch <frosch@openttd.org>2016-11-05 19:16:59 +0000
commit476b2b0e8ca97807c2ffa0bb56ca7afcb5371a3b (patch)
tree5e30db10c875d4b9e7979618ff76f1a24bff0a3e /src/vehiclelist.h
parentd9bfe88261b99631322ca348e48027e22fa3c84e (diff)
downloadopenttd-476b2b0e8ca97807c2ffa0bb56ca7afcb5371a3b.tar.xz
(svn r27677) -Codechange: Remove implicit VehicleListIdentifier from uint32 constructor, to make conversions more explicit.
Diffstat (limited to 'src/vehiclelist.h')
-rw-r--r--src/vehiclelist.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vehiclelist.h b/src/vehiclelist.h
index c96fb692a..996c8c007 100644
--- a/src/vehiclelist.h
+++ b/src/vehiclelist.h
@@ -35,7 +35,8 @@ struct VehicleListIdentifier {
uint32 index; ///< A vehicle list type specific index.
uint32 Pack() const;
- bool Unpack(uint32 data);
+ bool UnpackIfValid(uint32 data);
+ static VehicleListIdentifier UnPack(uint32 data);
/**
* Create a simple vehicle list.
@@ -47,7 +48,7 @@ struct VehicleListIdentifier {
VehicleListIdentifier(VehicleListType type, VehicleType vtype, CompanyID company, uint index = 0) :
type(type), vtype(vtype), company(company), index(index) {}
- VehicleListIdentifier(uint32 data = 0);
+ VehicleListIdentifier() : type(), vtype(), company(), index() {}
};
/** A list of vehicles. */