Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
This commit is contained in:
@ -68,7 +68,7 @@ private:
|
||||
|
||||
ControllerDevice controllers[MAX_CONTROLLERS];
|
||||
|
||||
InputDefault *input;
|
||||
InputDefault *input = nullptr;
|
||||
|
||||
void OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value);
|
||||
void OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value);
|
||||
|
||||
Reference in New Issue
Block a user