Style: apply clang-format (3.9.1) to current source

This commit is contained in:
Rémi Verschelde 2017-12-11 15:18:06 +01:00
parent b3a1821b46
commit acb7107720
12 changed files with 44 additions and 44 deletions

View file

@ -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;

View file

@ -464,8 +464,7 @@ 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();

View file

@ -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);

View file

@ -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);

View file

@ -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());

View file

@ -45,7 +45,8 @@ 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() +
String _template =
String() +
"extends %BASE%\n\n" +
"# class member variables go here, for example:\n" +
"# var a = 2\n" +
@ -60,15 +61,15 @@ String GDScriptLanguage::get_template(const String &p_class_name, const String &
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() +
String _template =
String() +
"extends %BASE%\n\n" +
"func _ready():\n" +
"\tpass\n";

View file

@ -2139,8 +2139,7 @@ void GDParser::_parse_extends(ClassNode *p_class) {
StringName identifier = tokenizer->get_token_identifier();
p_class->extends_class.push_back(identifier);
}
break;
} break;
case GDTokenizer::TK_PERIOD:
break;

View file

@ -633,7 +633,6 @@ Error EditorExportPlatformOSX::export_project(const String &p_path, bool p_debug
} else {
err = ERR_CANT_OPEN;
}
}
}

View file

@ -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);
@ -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