summaryrefslogtreecommitdiff
path: root/drivers/windows
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-11-24 13:00:27 +0100
committerGitHub <noreply@github.com>2020-11-24 13:00:27 +0100
commit32b31a5fa47b1e068be98f3196cf5d83a2260667 (patch)
tree1216c119f5326964d34d9cab2ab78df911c1469f /drivers/windows
parent4159baff6c564eaaec1cbe1e546805dd42b9148f (diff)
parent7bd03b718871137740c6bf074e984bba8dc113c3 (diff)
Merge pull request #43730 from qarmin/core_drivers_default_values
Initialize class/struct variables with default values in core/ and drivers/
Diffstat (limited to 'drivers/windows')
-rw-r--r--drivers/windows/dir_access_windows.cpp2
-rw-r--r--drivers/windows/dir_access_windows.h10
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp
index 3c61aa7289..197cd1d074 100644
--- a/drivers/windows/dir_access_windows.cpp
+++ b/drivers/windows/dir_access_windows.cpp
@@ -367,8 +367,6 @@ DirAccessWindows::DirAccessWindows() {
p->h = INVALID_HANDLE_VALUE;
current_dir = ".";
- drive_count = 0;
-
#ifdef UWP_ENABLED
Windows::Storage::StorageFolder ^ install_folder = Windows::ApplicationModel::Package::Current->InstalledLocation;
change_dir(install_folder->Path->Data());
diff --git a/drivers/windows/dir_access_windows.h b/drivers/windows/dir_access_windows.h
index 47aedfecf5..3b059b1626 100644
--- a/drivers/windows/dir_access_windows.h
+++ b/drivers/windows/dir_access_windows.h
@@ -46,16 +46,16 @@ class DirAccessWindows : public DirAccess {
MAX_DRIVES = 26
};
- DirAccessWindowsPrivate *p;
+ DirAccessWindowsPrivate *p = nullptr;
/* Windows stuff */
- char drives[MAX_DRIVES]; // a-z:
- int drive_count;
+ char drives[MAX_DRIVES] = { 0 }; // a-z:
+ int drive_count = 0;
String current_dir;
- bool _cisdir;
- bool _cishidden;
+ bool _cisdir = false;
+ bool _cishidden = false;
public:
virtual Error list_dir_begin(); ///< This starts dir listing