You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Remove assignment and declarations in if statements
After discussing with @reduz and @akien-mga it was decided that we do not allow assignments or declarations in if statements. This PR removes the instances of this I could find by automated means.
This commit is contained in:
@@ -183,8 +183,8 @@ void FileDialog::_action_pressed() {
|
||||
String path = dir_access->get_current_dir();
|
||||
|
||||
path = path.replace("\\", "/");
|
||||
|
||||
if (TreeItem *item = tree->get_selected()) {
|
||||
TreeItem *item = tree->get_selected();
|
||||
if (item) {
|
||||
Dictionary d = item->get_metadata(0);
|
||||
if (d["dir"]) {
|
||||
path = path.plus_file(d["name"]);
|
||||
|
||||
Reference in New Issue
Block a user