Provide default values for various scalar fields

This commit is contained in:
Michał Janiszewski 2017-09-30 22:27:45 +02:00
parent 4841e2c6f3
commit 540f306809
2 changed files with 6 additions and 6 deletions

View File

@ -38,7 +38,7 @@ struct RideCreateGameActionResult : public GameActionResult
RideCreateGameActionResult() : GameActionResult(GA_ERROR::OK, 0) {}
RideCreateGameActionResult(GA_ERROR error, rct_string_id message) : GameActionResult(error, message) {}
sint32 rideIndex;
sint32 rideIndex = -1;
};
struct RideCreateAction : public GameActionBase<GAME_COMMAND_CREATE_RIDE, RideCreateGameActionResult>

View File

@ -214,12 +214,12 @@ private:
{
}
uint32 tick;
uint32 eax, ebx, ecx, edx, esi, edi, ebp;
uint32 tick = 0;
uint32 eax = 0, ebx = 0, ecx = 0, edx = 0, esi = 0, edi = 0, ebp = 0;
GameAction::Ptr action;
uint8 playerid;
uint8 callback;
uint32 commandIndex;
uint8 playerid = 0;
uint8 callback = 0;
uint32 commandIndex = 0;
bool operator<(const GameCommand& comp) const {
return tick < comp.tick && commandIndex < comp.commandIndex;
}