(svn r27677) -Codechange: Remove implicit VehicleListIdentifier from uint32 constructor, to make conversions more explicit.

This commit is contained in:
frosch
2016-11-05 19:16:59 +00:00
parent 616c02c42e
commit 9d8c04b0cc
5 changed files with 12 additions and 9 deletions

View File

@@ -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. */