From cb282c6ef0bb91957f8a6f422705813bd47c788c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 17 Mar 2020 07:33:00 +0100 Subject: Style: Set clang-format Standard to Cpp11 For us, it practically only changes the fact that `A>` is now used instead of the C++03 compatible `A >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`. --- modules/visual_script/visual_script_editor.cpp | 36 +++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'modules/visual_script/visual_script_editor.cpp') diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 8840b9f7cf..ca255ebf82 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -1458,7 +1458,7 @@ void VisualScriptEditor::_remove_output_port(int p_id, int p_port) { List data_connections; script->get_data_connection_list(func, &data_connections); - HashMap > conn_map; + HashMap> conn_map; for (const List::Element *E = data_connections.front(); E; E = E->next()) { if (E->get().from_node == p_id && E->get().from_port == p_port) { // push into the connections map @@ -3078,8 +3078,8 @@ void VisualScriptEditor::_graph_disconnected(const String &p_from, int p_from_sl void VisualScriptEditor::_move_nodes_with_rescan(const StringName &p_func_from, const StringName &p_func_to, int p_id) { Set nodes_to_move; - HashMap > seqconns_to_move; // from => List(outp, to) - HashMap > > dataconns_to_move; // to => List(inp_p => from, outp) + HashMap> seqconns_to_move; // from => List(outp, to) + HashMap>> dataconns_to_move; // to => List(inp_p => from, outp) nodes_to_move.insert(p_id); Set sequence_connections; @@ -3087,7 +3087,7 @@ void VisualScriptEditor::_move_nodes_with_rescan(const StringName &p_func_from, List sequence_conns; script->get_sequence_connection_list(p_func_from, &sequence_conns); - HashMap > seqcons; // from => List(out_p => to) + HashMap> seqcons; // from => List(out_p => to) for (List::Element *E = sequence_conns.front(); E; E = E->next()) { int from = E->get().from_node; @@ -3102,7 +3102,7 @@ void VisualScriptEditor::_move_nodes_with_rescan(const StringName &p_func_from, int conn = p_id; List stack; - HashMap > seen; // from, outp + HashMap> seen; // from, outp while (seqcons.has(conn)) { for (auto E = seqcons[conn].front(); E; E = E->next()) { if (seen.has(conn) && seen[conn].has(E->key())) { @@ -3139,7 +3139,7 @@ void VisualScriptEditor::_move_nodes_with_rescan(const StringName &p_func_from, List data_connections; script->get_data_connection_list(p_func_from, &data_connections); - HashMap > > connections; + HashMap>> connections; for (List::Element *E = data_connections.front(); E; E = E->next()) { int from = E->get().from_node; @@ -3148,14 +3148,14 @@ void VisualScriptEditor::_move_nodes_with_rescan(const StringName &p_func_from, int in_p = E->get().to_port; if (!connections.has(to)) - connections.set(to, Map >()); + connections.set(to, Map>()); connections[to].insert(in_p, Pair(from, out_p)); } // go through the HashMap and do all sorts of crazy ass stuff now... Set nodes_to_be_added; for (Set::Element *F = nodes_to_move.front(); F; F = F->next()) { - HashMap > seen; + HashMap> seen; List stack; int id = F->get(); while (connections.has(id)) { @@ -3190,7 +3190,7 @@ void VisualScriptEditor::_move_nodes_with_rescan(const StringName &p_func_from, seen[id].insert(E->key()); stack.push_back(id); if (!dataconns_to_move.has(id)) - dataconns_to_move.set(id, Map >()); + dataconns_to_move.set(id, Map>()); dataconns_to_move[id].insert(E->key(), Pair(E->get().first, E->get().second)); id = E->get().first; nodes_to_be_added.insert(id); @@ -3261,7 +3261,7 @@ void VisualScriptEditor::_move_nodes_with_rescan(const StringName &p_func_from, dataconns_to_move.get_key_list(&keys); for (List::Element *E = keys.front(); E; E = E->next()) { int to_node = E->get(); // to_node - for (Map >::Element *F = dataconns_to_move[E->get()].front(); F; F = F->next()) { + for (Map>::Element *F = dataconns_to_move[E->get()].front(); F; F = F->next()) { int inp_p = F->key(); Pair fro = F->get(); @@ -3933,7 +3933,7 @@ void VisualScriptEditor::_notification(int p_what) { bool dark_theme = tm->get_constant("dark_theme", "Editor"); - List > colors; + List> colors; if (dark_theme) { colors.push_back(Pair("flow_control", Color(0.96, 0.96, 0.96))); colors.push_back(Pair("functions", Color(0.96, 0.52, 0.51))); @@ -3950,7 +3950,7 @@ void VisualScriptEditor::_notification(int p_what) { colors.push_back(Pair("constants", Color(0.94, 0.18, 0.49))); } - for (List >::Element *E = colors.front(); E; E = E->next()) { + for (List>::Element *E = colors.front(); E; E = E->next()) { Ref sb = tm->get_stylebox("frame", "GraphNode"); if (!sb.is_null()) { Ref frame_style = sb->duplicate(); @@ -4149,7 +4149,7 @@ void VisualScriptEditor::_menu_option(int p_what) { } } - for (Map >::Element *E = clipboard->nodes.front(); E; E = E->next()) { + for (Map>::Element *E = clipboard->nodes.front(); E; E = E->next()) { Ref node = E->get()->duplicate(); @@ -4196,7 +4196,7 @@ void VisualScriptEditor::_menu_option(int p_what) { case EDIT_CREATE_FUNCTION: { StringName function = ""; - Map > nodes; + Map> nodes; Set selections; for (int i = 0; i < graph->get_child_count(); i++) { GraphNode *gn = Object::cast_to(graph->get_child(i)); @@ -4252,7 +4252,7 @@ void VisualScriptEditor::_menu_option(int p_what) { // the user wants to connect the nodes int top_nd = -1; Vector2 top; - for (Map >::Element *E = nodes.front(); E; E = E->next()) { + for (Map>::Element *E = nodes.front(); E; E = E->next()) { Ref nd = script->get_node(function, E->key()); if (nd.is_valid() && nd->has_input_sequence_port()) { if (top_nd < 0) { @@ -4316,7 +4316,7 @@ void VisualScriptEditor::_menu_option(int p_what) { } List inputs; // input types - List > input_connections; + List> input_connections; { List dats; script->get_data_connection_list(function, &dats); @@ -4359,7 +4359,7 @@ void VisualScriptEditor::_menu_option(int p_what) { // Move the nodes - for (Map >::Element *E = nodes.front(); E; E = E->next()) { + for (Map>::Element *E = nodes.front(); E; E = E->next()) { undo_redo->add_do_method(script.ptr(), "remove_node", function, E->key()); undo_redo->add_do_method(script.ptr(), "add_node", new_fn, E->key(), E->get(), script->get_node_position(function, E->key())); @@ -4414,7 +4414,7 @@ void VisualScriptEditor::_menu_option(int p_what) { // * might make the system more intelligent by checking port from info. int i = 0; - List >::Element *F = input_connections.front(); + List>::Element *F = input_connections.front(); for (List::Element *E = inputs.front(); E && F; E = E->next(), F = F->next()) { func_node->add_argument(E->get(), "arg_" + String::num_int64(i), i); undo_redo->add_do_method(script.ptr(), "data_connect", new_fn, fn_id, i, F->get().first, F->get().second); -- cgit v1.2.3