Style: apply clang-format (3.9.1) to current source
This commit is contained in:
parent
b3a1821b46
commit
acb7107720
12 changed files with 44 additions and 44 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<String> &to_erase) {
|
|||
}
|
||||
|
||||
void DependencyRemoveDialog::ok_pressed() {
|
||||
|
||||
|
||||
DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
for (Map<String, TreeItem *>::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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<Ref<Script> > &used);
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ private:
|
|||
|
||||
PanelContainer *fps;
|
||||
Label *fps_label;
|
||||
|
||||
|
||||
struct _RayResult {
|
||||
|
||||
Spatial *item;
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -45,33 +45,34 @@ void GDScriptLanguage::get_string_delimiters(List<String> *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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -633,7 +633,6 @@ Error EditorExportPlatformOSX::export_project(const String &p_path, bool p_debug
|
|||
} else {
|
||||
err = ERR_CANT_OPEN;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<Vector3> vertices = nm.navmesh->get_vertices();
|
||||
int len = vertices.size();
|
||||
if (len == 0)
|
||||
|
|
Loading…
Reference in a new issue