diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-12-08 15:53:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 15:53:42 +0100 |
commit | 90bdba576af2d5f0a8ecdbef065d6ef0075bc2f2 (patch) | |
tree | 22e25092f8a56af0c467442baa763f7a2db1c7cb /platform/uwp | |
parent | edb3686ee2379ad28d1273797db8bd9ded38ff1e (diff) | |
parent | e1811b689b6854668ca690831df8603820b68573 (diff) |
Merge pull request #43742 from qarmin/editor_modules_default_values
Initialize class/struct variables with default values in platform/ and editor/
Diffstat (limited to 'platform/uwp')
-rw-r--r-- | platform/uwp/context_egl_uwp.cpp | 3 | ||||
-rw-r--r-- | platform/uwp/export/export.cpp | 6 | ||||
-rw-r--r-- | platform/uwp/joypad_uwp.h | 21 | ||||
-rw-r--r-- | platform/uwp/os_uwp.h | 14 |
4 files changed, 17 insertions, 27 deletions
diff --git a/platform/uwp/context_egl_uwp.cpp b/platform/uwp/context_egl_uwp.cpp index 2da6c5897a..a6607ed42c 100644 --- a/platform/uwp/context_egl_uwp.cpp +++ b/platform/uwp/context_egl_uwp.cpp @@ -204,7 +204,8 @@ ContextEGL_UWP::ContextEGL_UWP(CoreWindow ^ p_window, Driver p_driver) : mEglContext(EGL_NO_CONTEXT), mEglSurface(EGL_NO_SURFACE), driver(p_driver), - window(p_window) {} + window(p_window), + vsync(false) {} ContextEGL_UWP::~ContextEGL_UWP() { cleanup(); diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp index 30568241a9..00b57c48f3 100644 --- a/platform/uwp/export/export.cpp +++ b/platform/uwp/export/export.cpp @@ -108,7 +108,7 @@ class AppxPackager { struct BlockHash { String base64_hash; - size_t compressed_size; + size_t compressed_size = 0; }; struct FileMeta { @@ -120,12 +120,10 @@ class AppxPackager { Vector<BlockHash> hashes; uLong file_crc32 = 0; ZPOS64_T zip_offset = 0; - - FileMeta() {} }; String progress_task; - FileAccess *package; + FileAccess *package = nullptr; Set<String> mime_types; diff --git a/platform/uwp/joypad_uwp.h b/platform/uwp/joypad_uwp.h index 13f246a438..2df87d6fd5 100644 --- a/platform/uwp/joypad_uwp.h +++ b/platform/uwp/joypad_uwp.h @@ -58,21 +58,12 @@ private: struct ControllerDevice { Windows::Gaming::Input::IGameController ^ controller_reference; - int id; - bool connected; - ControllerType type; - float ff_timestamp; - float ff_end_timestamp; - bool vibrating; - - ControllerDevice() { - id = -1; - connected = false; - type = ControllerType::GAMEPAD_CONTROLLER; - ff_timestamp = 0.0f; - ff_end_timestamp = 0.0f; - vibrating = false; - } + int id = -1; + bool connected = false; + ControllerType type = ControllerType::GAMEPAD_CONTROLLER; + float ff_timestamp = 0; + float ff_end_timestamp = 0; + bool vibrating = false; }; ControllerDevice controllers[MAX_CONTROLLERS]; diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h index c2d1acf8a0..fd25cefe2b 100644 --- a/platform/uwp/os_uwp.h +++ b/platform/uwp/os_uwp.h @@ -55,13 +55,13 @@ public: CHAR_EVENT_MESSAGE }; - bool alt, shift, control; - MessageType type; - bool pressed; - unsigned int keycode; - unsigned int physical_keycode; - unsigned int unicode; - bool echo; + bool alt = false, shift = false, control = false; + MessageType type = KEY_EVENT_MESSAGE; + bool pressed = false; + unsigned int keycode = 0; + unsigned int physical_keycode = 0; + unsigned int unicode = 0; + bool echo = false; CorePhysicalKeyStatus status; }; |