diff options
| author | Juan Linietsky | 2017-01-14 09:16:41 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-01-14 09:17:15 -0300 |
| commit | da4170540cbe3dcec4855ddbb59edf1abd7cf9b4 (patch) | |
| tree | 873e57d1fdbf5cfe414c9610068e78ce0d4258db /core | |
| parent | 7b9f2d9929d0e8516d42379962533df823c7c550 (diff) | |
| download | godot-da4170540cbe3dcec4855ddbb59edf1abd7cf9b4.tar.gz godot-da4170540cbe3dcec4855ddbb59edf1abd7cf9b4.tar.zst godot-da4170540cbe3dcec4855ddbb59edf1abd7cf9b4.zip | |
Fixed dir access return value, changed it to Error like all other funcs
Diffstat (limited to 'core')
| -rw-r--r-- | core/bind/core_bind.cpp | 4 | ||||
| -rw-r--r-- | core/bind/core_bind.h | 2 | ||||
| -rw-r--r-- | core/io/file_access_pack.cpp | 4 | ||||
| -rw-r--r-- | core/io/file_access_pack.h | 2 | ||||
| -rw-r--r-- | core/os/dir_access.h | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index fe2be260d..ab3e340a8 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1830,9 +1830,9 @@ Error _Directory::open(const String& p_path) { return OK; } -bool _Directory::list_dir_begin() { +Error _Directory::list_dir_begin() { - ERR_FAIL_COND_V(!d,false); + ERR_FAIL_COND_V(!d,ERR_UNCONFIGURED); return d->list_dir_begin(); } diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 0774492f6..5b32aaa9c 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -456,7 +456,7 @@ public: Error open(const String& p_path); - bool list_dir_begin(); ///< This starts dir listing + Error list_dir_begin(); ///< This starts dir listing String get_next(); bool current_is_dir() const; diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index 7e3a6d1fa..d63539a7a 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -340,7 +340,7 @@ FileAccessPack::~FileAccessPack() { ////////////////////////////////////////////////////////////////////////////////// -bool DirAccessPack::list_dir_begin() { +Error DirAccessPack::list_dir_begin() { list_dirs.clear(); @@ -356,7 +356,7 @@ bool DirAccessPack::list_dir_begin() { list_files.push_back(E->get()); } - return true; + return OK; } String DirAccessPack::get_next(){ diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h index 83340a662..0a1320e57 100644 --- a/core/io/file_access_pack.h +++ b/core/io/file_access_pack.h @@ -209,7 +209,7 @@ class DirAccessPack : public DirAccess { public: - virtual bool list_dir_begin(); + virtual Error list_dir_begin(); virtual String get_next(); virtual bool current_is_dir() const; virtual bool current_is_hidden() const; diff --git a/core/os/dir_access.h b/core/os/dir_access.h index f824b5f31..7c173fc78 100644 --- a/core/os/dir_access.h +++ b/core/os/dir_access.h @@ -72,7 +72,7 @@ protected: public: - virtual bool list_dir_begin()=0; ///< This starts dir listing + virtual Error list_dir_begin()=0; ///< This starts dir listing virtual String get_next(bool* p_is_dir); // compatibility virtual String get_next()=0; virtual bool current_is_dir() const=0; |
