summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-12 09:25:34 +0100
committerGitHub <noreply@github.com>2018-12-12 09:25:34 +0100
commitc8a5400654ebc73c9af28d051f367b8eaa75212e (patch)
treef982f6204781746b460fb1909f90224433df744a /core/os
parentecc588867482c0b32c3896591f55630baba1ef7c (diff)
parent08f22f1cf0e0d133b7ea763dc3886cf462c6fcb2 (diff)
Merge pull request #24241 from Rubonnek/move-to-initializer-list
Moved member variables to initializer list
Diffstat (limited to 'core/os')
-rw-r--r--core/os/dir_access.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp
index ce70b859eb..8f4f2b6920 100644
--- a/core/os/dir_access.cpp
+++ b/core/os/dir_access.cpp
@@ -349,9 +349,9 @@ class DirChanger {
String original_dir;
public:
- DirChanger(DirAccess *p_da, String p_dir) {
- da = p_da;
- original_dir = p_da->get_current_dir();
+ DirChanger(DirAccess *p_da, String p_dir) :
+ da(p_da),
+ original_dir(p_da->get_current_dir()) {
p_da->change_dir(p_dir);
}