From 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 14 May 2020 13:23:58 +0200 Subject: Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027. --- editor/inspector_dock.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'editor/inspector_dock.cpp') diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index 3715547bdc..ab425aab40 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -85,7 +85,6 @@ void InspectorDock::_menu_option(int p_option) { current->get_property_list(&props); Map duplicates; for (List::Element *E = props.front(); E; E = E->next()) { - if (!(E->get().usage & PROPERTY_USAGE_STORAGE)) continue; @@ -93,10 +92,8 @@ void InspectorDock::_menu_option(int p_option) { if (v.is_ref()) { REF ref = v; if (ref.is_valid()) { - RES res = ref; if (res.is_valid()) { - if (!duplicates.has(res)) { duplicates[res] = res->duplicate(); } @@ -217,7 +214,6 @@ void InspectorDock::_prepare_history() { Ref base_icon = get_theme_icon("Object", "EditorIcons"); Set already; for (int i = editor_history->get_history_len() - 1; i >= history_to; i--) { - ObjectID id = editor_history->get_history_obj(i); Object *obj = ObjectDB::get_instance(id); if (!obj || already.has(id)) { @@ -342,7 +338,6 @@ void InspectorDock::_notification(int p_what) { } void InspectorDock::_bind_methods() { - ClassDB::bind_method("update_keying", &InspectorDock::update_keying); ClassDB::bind_method("_transform_keyed", &InspectorDock::_transform_keyed); // Still used by some connect_compat. @@ -376,7 +371,6 @@ void InspectorDock::clear() { } void InspectorDock::update(Object *p_object) { - EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history(); backward_button->set_disabled(editor_history->is_at_beginning()); forward_button->set_disabled(editor_history->is_at_end()); @@ -442,12 +436,10 @@ void InspectorDock::update(Object *p_object) { p_object->get_method_list(&methods); if (!methods.empty()) { - bool found = false; List::Element *I = methods.front(); int i = 0; while (I) { - if (I->get().flags & METHOD_FLAG_EDITOR) { if (!found) { p->add_separator(); @@ -469,13 +461,10 @@ void InspectorDock::update_keying() { bool valid = false; if (AnimationPlayerEditor::singleton->get_track_editor()->has_keying()) { - EditorHistory *editor_history = EditorNode::get_singleton()->get_editor_history(); if (editor_history->get_path_size() >= 1) { - Object *obj = ObjectDB::get_instance(editor_history->get_path_object(0)); if (Object::cast_to(obj)) { - valid = true; } } -- cgit v1.2.3