Bug 1545806 - Correct the initializer list in Windows gamepad axis value constructor. r=qdot
authorDaosheng Mu <daoshengmu@gmail.com>
Mon, 22 Apr 2019 18:37:11 +0000
changeset 470400 127af2f6e16df6f091fa45f636115ce7ada68b34
parent 470399 81592d22b501a9d74e4968f6373ca22750aa947f
child 470401 5f7f77eac50e0fe1082411aa5c566714281fdbd4
push id35905
push userdvarga@mozilla.com
push dateTue, 23 Apr 2019 09:53:27 +0000
treeherdermozilla-central@831918f009f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1545806
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1545806 - Correct the initializer list in Windows gamepad axis value constructor. r=qdot Differential Revision: https://phabricator.services.mozilla.com/D28242
dom/gamepad/windows/WindowsGamepad.cpp
--- a/dom/gamepad/windows/WindowsGamepad.cpp
+++ b/dom/gamepad/windows/WindowsGamepad.cpp
@@ -118,17 +118,18 @@ class Gamepad {
   unsigned numButtons;
 
   nsTArray<bool> buttons;
   struct axisValue {
     HIDP_VALUE_CAPS caps;
     double value;
     bool active;
 
-    axisValue() = default;
+    axisValue()
+        : value(0.0f), active(false) {}
     explicit axisValue(const HIDP_VALUE_CAPS& aCaps)
         : caps(aCaps), value(0.0f), active(true) {}
   };
   nsTArray<axisValue> axes;
 
   RefPtr<GamepadRemapper> remapper;
 
   // Used during rescan to find devices that were disconnected.