From 147a9fa78286a1a5c09951777e61fa4251568746 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 13 Feb 2018 09:15:52 +0100 Subject: tracker/wii: fix uninitialized memory access Causes a warning in Visual Studio. Rightly so. --- tracker-wii/wiiyourself/wiimote_state.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/tracker-wii/wiiyourself/wiimote_state.h b/tracker-wii/wiiyourself/wiimote_state.h index 1bf167a2..06bfce46 100644 --- a/tracker-wii/wiiyourself/wiimote_state.h +++ b/tracker-wii/wiiyourself/wiimote_state.h @@ -11,16 +11,10 @@ // the 'wiimote_state' struct contains all the Wiimote and Extension state data // (buttons etc) - the wiimote class inherits from this and the app can poll // the data there at any time. -#ifdef _MSC_VER // VC -# pragma once -#endif - -#ifndef _WIIMOTE_STATE_H -# define _WIIMOTE_STATE_H +#pragma once #include "wiimote_common.h" - // wiimote_state (contains the Wiimote and Extension data and settings) struct wiimote_state { @@ -354,9 +348,9 @@ struct wiimote_state void Clear (bool including_deadzones) { - joystick::deadzone nunchuk_deadzone, - classic_joyl_deadzone, - classic_joyr_deadzone; + joystick::deadzone nunchuk_deadzone {}, + classic_joyl_deadzone {}, + classic_joyr_deadzone {}; // preserve the deadzone settings? if(!including_deadzones) { @@ -375,5 +369,3 @@ struct wiimote_state } } }; - -#endif // _WIIMOTE_STATE_H \ No newline at end of file -- cgit v1.2.3