mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Initialise a few variables that -flto seems to think could possibly be uninitialised
parent
03ca3190c9
commit
e453572b6a
|
@ -50,7 +50,7 @@ private:
|
||||||
public:
|
public:
|
||||||
Order *next; ///< Pointer to next order. If NULL, end of list
|
Order *next; ///< Pointer to next order. If NULL, end of list
|
||||||
|
|
||||||
Order() : refit_cargo(CT_NO_REFIT), max_speed(UINT16_MAX) {}
|
Order() : flags(0), refit_cargo(CT_NO_REFIT), max_speed(UINT16_MAX) {}
|
||||||
~Order();
|
~Order();
|
||||||
|
|
||||||
Order(uint32 packed);
|
Order(uint32 packed);
|
||||||
|
|
|
@ -118,7 +118,8 @@ void SetDParamMaxValue(uint n, uint64 max_value, uint min_count, FontSize size)
|
||||||
*/
|
*/
|
||||||
void SetDParamMaxDigits(uint n, uint count, FontSize size)
|
void SetDParamMaxDigits(uint n, uint count, FontSize size)
|
||||||
{
|
{
|
||||||
uint front, next;
|
uint front = 0;
|
||||||
|
uint next = 0;
|
||||||
GetBroadestDigit(&front, &next, size);
|
GetBroadestDigit(&front, &next, size);
|
||||||
uint64 val = count > 1 ? front : next;
|
uint64 val = count > 1 ? front : next;
|
||||||
for (; count > 1; count--) {
|
for (; count > 1; count--) {
|
||||||
|
|
|
@ -131,7 +131,7 @@ CommandCost CmdBuildVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
|
||||||
DoCommandFlag subflags = flags;
|
DoCommandFlag subflags = flags;
|
||||||
if (refitting) subflags |= DC_EXEC;
|
if (refitting) subflags |= DC_EXEC;
|
||||||
|
|
||||||
Vehicle *v;
|
Vehicle *v = NULL;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case VEH_TRAIN: value.AddCost(CmdBuildRailVehicle(tile, subflags, e, GB(p1, 24, 8), &v)); break;
|
case VEH_TRAIN: value.AddCost(CmdBuildRailVehicle(tile, subflags, e, GB(p1, 24, 8), &v)); break;
|
||||||
case VEH_ROAD: value.AddCost(CmdBuildRoadVehicle(tile, subflags, e, GB(p1, 24, 8), &v)); break;
|
case VEH_ROAD: value.AddCost(CmdBuildRoadVehicle(tile, subflags, e, GB(p1, 24, 8), &v)); break;
|
||||||
|
|
Loading…
Reference in New Issue