diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 13:23:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 16:54:55 +0200 |
commit | 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch) | |
tree | a27e497da7104dd0a64f98a04fa3067668735e91 /editor/inspector_dock.cpp | |
parent | 710b34b70227becdc652b4ae027fe0ac47409642 (diff) |
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.
Diffstat (limited to 'editor/inspector_dock.cpp')
-rw-r--r-- | editor/inspector_dock.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
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<RES, RES> duplicates; for (List<PropertyInfo>::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<Texture2D> base_icon = get_theme_icon("Object", "EditorIcons"); Set<ObjectID> 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<MethodInfo>::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<Node>(obj)) { - valid = true; } } |