summaryrefslogtreecommitdiffhomepage
path: root/tracker-wii
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-02-13 09:15:52 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-02-13 09:15:52 +0100
commit147a9fa78286a1a5c09951777e61fa4251568746 (patch)
tree808fda65739acf0a43fd79986ce5f2f3d88a0f52 /tracker-wii
parent00166aa8fc517d7bdc19506d31e233813504330b (diff)
tracker/wii: fix uninitialized memory access
Causes a warning in Visual Studio. Rightly so.
Diffstat (limited to 'tracker-wii')
-rw-r--r--tracker-wii/wiiyourself/wiimote_state.h16
1 files 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