diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index d316468cb29..7bac2207d32 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -81,8 +81,8 @@ Error AudioDriverWASAPI::init_device(bool reinit) { switch (wasapi_channels) { case 2: // Stereo -// case 6: // Surround 5.1 -// case 8: // Surround 7.1 + //case 6: // Surround 5.1 + //case 8: // Surround 7.1 channels = wasapi_channels; break; diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index 69e4ffdf0c3..9c2852ef998 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -307,12 +307,12 @@ void DependencyEditorOwners::_select_file(int p_idx) { void DependencyEditorOwners::_file_option(int p_option) { switch (p_option) { - case FILE_OPEN: { - int idx = owners->get_current(); - if (idx < 0 || idx >= owners->get_item_count()) - break; - _select_file(idx); - } break; + case FILE_OPEN: { + int idx = owners->get_current(); + if (idx < 0 || idx >= owners->get_item_count()) + break; + _select_file(idx); + } break; } } @@ -461,11 +461,10 @@ void DependencyRemoveDialog::show(const Vector &to_erase) { } void DependencyRemoveDialog::ok_pressed() { - + DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES); for (Map::Element *E = files.front(); E; E = E->next()) { - if (da->dir_exists(E->key())) - { + if (da->dir_exists(E->key())) { String path = OS::get_singleton()->get_resource_dir() + E->key().replace_first("res://", "/"); OS::get_singleton()->move_path_to_trash(path); EditorFileSystem::get_singleton()->scan(); diff --git a/editor/dependency_editor.h b/editor/dependency_editor.h index d6d0bd6be16..ce8d09da955 100644 --- a/editor/dependency_editor.h +++ b/editor/dependency_editor.h @@ -80,10 +80,12 @@ class DependencyEditorOwners : public AcceptDialog { void _list_rmb_select(int p_item, const Vector2 &p_pos); void _select_file(int p_idx); void _file_option(int p_option); + private: enum FileMenu { FILE_OPEN }; + public: void show(const String &p_path); DependencyEditorOwners(EditorNode *p_editor); diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index 9e53930cb6c..7021fe1e2b0 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -288,7 +288,7 @@ class ScriptEditor : public VBoxContainer { void _script_selected(int p_idx); - void _script_rmb_selected(int p_idx, const Vector2 & p_pos); + void _script_rmb_selected(int p_idx, const Vector2 &p_pos); void _find_scripts(Node *p_base, Node *p_current, Set > &used); diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index 5f23f313c03..3cdc1cccfb1 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -117,7 +117,7 @@ private: PanelContainer *fps; Label *fps_label; - + struct _RayResult { Spatial *item; diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index f6f47eac4d4..3f1bcb4a2a0 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -124,9 +124,9 @@ void ScriptCreateDialog::_create_new() { cname = class_name->get_text(); String text; - if (template_select==0) { + if (template_select == 0) { text = ScriptServer::get_language(language_menu->get_selected())->get_template(cname, parent_name->get_text()); - } else if (template_select==1) { + } else if (template_select == 1) { text = ScriptServer::get_language(language_menu->get_selected())->get_empty_template(cname, parent_name->get_text()); } else if (template_select == 2) { text = ScriptServer::get_language(language_menu->get_selected())->get_nocomment_template(cname, parent_name->get_text()); diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index 061998ad2b7..3d7dfc37225 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -45,33 +45,34 @@ void GDScriptLanguage::get_string_delimiters(List *p_delimiters) const { } String GDScriptLanguage::get_template(const String &p_class_name, const String &p_base_class_name) const { - String _template = String() + - "extends %BASE%\n\n" + - "# class member variables go here, for example:\n" + - "# var a = 2\n" + - "# var b = \"textvar\"\n\n" + - "func _ready():\n" + - "\t# Called every time the node is added to the scene.\n" + - "\t# Initialization here\n" + - "\tpass\n"; + String _template = + String() + + "extends %BASE%\n\n" + + "# class member variables go here, for example:\n" + + "# var a = 2\n" + + "# var b = \"textvar\"\n\n" + + "func _ready():\n" + + "\t# Called every time the node is added to the scene.\n" + + "\t# Initialization here\n" + + "\tpass\n"; return _template.replace("%BASE%", p_base_class_name); } String GDScriptLanguage::get_empty_template(const String &p_class_name, const String &p_base_class_name) const { - String _template = String() + - "extends %BASE%\n\n"; + String _template = String() + "extends %BASE%\n\n"; return _template.replace("%BASE%", p_base_class_name); } String GDScriptLanguage::get_nocomment_template(const String &p_class_name, const String &p_base_class_name) const { - String _template = String() + - "extends %BASE%\n\n" + - "func _ready():\n" + - "\tpass\n"; + String _template = + String() + + "extends %BASE%\n\n" + + "func _ready():\n" + + "\tpass\n"; return _template.replace("%BASE%", p_base_class_name); } diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index 422910c0ee9..99533ae030a 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/modules/gdscript/gd_parser.cpp @@ -2137,10 +2137,9 @@ void GDParser::_parse_extends(ClassNode *p_class) { case GDTokenizer::TK_IDENTIFIER: { - StringName identifier = tokenizer->get_token_identifier(); - p_class->extends_class.push_back(identifier); - } - break; + StringName identifier = tokenizer->get_token_identifier(); + p_class->extends_class.push_back(identifier); + } break; case GDTokenizer::TK_PERIOD: break; diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 61a0f5b6e9b..0b7a3dccde4 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -633,7 +633,6 @@ Error EditorExportPlatformOSX::export_project(const String &p_path, bool p_debug } else { err = ERR_CANT_OPEN; } - } } diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index cbb7ee066e5..587cd1d9853 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -282,7 +282,7 @@ public: virtual void set_use_vsync(bool p_enable); virtual bool is_vsync_enabled() const; - + virtual Error move_path_to_trash(String p_dir); void disable_crash_handler(); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 7b25cc1a1eb..7bea11ca4ec 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -537,9 +537,9 @@ void OS_X11::finalize() { spatial_sound_2d_server->finish(); memdelete(spatial_sound_2d_server); - //if (debugger_connection_console) { - // memdelete(debugger_connection_console); - //} +//if (debugger_connection_console) { +// memdelete(debugger_connection_console); +//} #ifdef JOYDEV_ENABLED memdelete(joystick); @@ -1384,8 +1384,8 @@ void OS_X11::process_xevents() { switch (event_data->evtype) { case XI_TouchBegin: // Fall-through - // Disabled hand-in-hand with the grabbing - //XIAllowTouchEvents(x11_display, event_data->deviceid, event_data->detail, x11_window, XIAcceptTouch); + // Disabled hand-in-hand with the grabbing + //XIAllowTouchEvents(x11_display, event_data->deviceid, event_data->detail, x11_window, XIAcceptTouch); case XI_TouchEnd: { @@ -1473,8 +1473,8 @@ void OS_X11::process_xevents() { GrabModeAsync, GrabModeAsync, x11_window, None, CurrentTime); } #ifdef TOUCH_ENABLED - // Grab touch devices to avoid OS gesture interference - /*for (int i = 0; i < touch.devices.size(); ++i) { +// Grab touch devices to avoid OS gesture interference +/*for (int i = 0; i < touch.devices.size(); ++i) { XIGrabDevice(x11_display, touch.devices[i], x11_window, CurrentTime, None, XIGrabModeAsync, XIGrabModeAsync, False, &touch.event_mask); }*/ #endif diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index 020aa348d34..ce61763efc1 100644 --- a/scene/3d/navigation.cpp +++ b/scene/3d/navigation.cpp @@ -34,7 +34,7 @@ void Navigation::_navmesh_link(int p_id) { ERR_FAIL_COND(!navmesh_map.has(p_id)); NavMesh &nm = navmesh_map[p_id]; ERR_FAIL_COND(nm.linked); - + DVector vertices = nm.navmesh->get_vertices(); int len = vertices.size(); if (len == 0)