summaryrefslogtreecommitdiff
path: root/scene/gui/file_dialog.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-28 20:47:23 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-28 20:47:23 +0200
commit361d9b514ef969a44f596c0bab9c86d9521379f3 (patch)
tree06980838c57d647127638b47e5ff4c26721bdc3c /scene/gui/file_dialog.cpp
parent0ce7e2763d8f32de9cd1980dd6339264339c946b (diff)
parent0e53dd642c44a613fdc1fa683ea373516e67c983 (diff)
Merge pull request #66542 from akien-mga/msvc-warning-c4706
Fix MSVC warning C4706: assignment within conditional expression
Diffstat (limited to 'scene/gui/file_dialog.cpp')
-rw-r--r--scene/gui/file_dialog.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 57f27e299f..cf7f439aef 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -172,18 +172,20 @@ void FileDialog::shortcut_input(const Ref<InputEvent> &p_event) {
void FileDialog::set_enable_multiple_selection(bool p_enable) {
tree->set_select_mode(p_enable ? Tree::SELECT_MULTI : Tree::SELECT_SINGLE);
-};
+}
Vector<String> FileDialog::get_selected_files() const {
Vector<String> list;
TreeItem *item = tree->get_root();
- while ((item = tree->get_next_selected(item))) {
+ item = tree->get_next_selected(item);
+ while (item) {
list.push_back(dir_access->get_current_dir().path_join(item->get_text(0)));
- };
+ item = tree->get_next_selected(item);
+ }
return list;
-};
+}
void FileDialog::update_dir() {
if (root_prefix.is_empty()) {