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.cpp | 8 +++--- modules/visual_script/visual_script.h | 4 +-- modules/visual_script/visual_script_editor.cpp | 36 +++++++++++++------------- modules/visual_script/visual_script_editor.h | 6 ++--- modules/visual_script/visual_script_nodes.cpp | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) (limited to 'modules/visual_script') diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index 1f3ba2f20b..d00cc6986f 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -827,7 +827,7 @@ void VisualScript::rename_custom_signal(const StringName &p_name, const StringNa void VisualScript::get_custom_signal_list(List *r_custom_signals) const { - for (const Map >::Element *E = custom_signals.front(); E; E = E->next()) { + for (const Map>::Element *E = custom_signals.front(); E; E = E->next()) { r_custom_signals->push_back(E->key()); } @@ -981,7 +981,7 @@ bool VisualScript::has_script_signal(const StringName &p_signal) const { void VisualScript::get_script_signal_list(List *r_signals) const { - for (const Map >::Element *E = custom_signals.front(); E; E = E->next()) { + for (const Map>::Element *E = custom_signals.front(); E; E = E->next()) { MethodInfo mi; mi.name = E->key(); @@ -1302,7 +1302,7 @@ Dictionary VisualScript::_get_data() const { d["variables"] = vars; Array sigs; - for (const Map >::Element *E = custom_signals.front(); E; E = E->next()) { + for (const Map>::Element *E = custom_signals.front(); E; E = E->next()) { Dictionary cs; cs["name"] = E->key(); @@ -2779,7 +2779,7 @@ void VisualScriptLanguage::get_recognized_extensions(List *p_extensions) } void VisualScriptLanguage::get_public_functions(List *p_functions) const { } -void VisualScriptLanguage::get_public_constants(List > *p_constants) const { +void VisualScriptLanguage::get_public_constants(List> *p_constants) const { } void VisualScriptLanguage::profiling_start() { diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h index d1005c025c..20273316b4 100644 --- a/modules/visual_script/visual_script.h +++ b/modules/visual_script/visual_script.h @@ -246,7 +246,7 @@ private: Map functions; Map variables; - Map > custom_signals; + Map> custom_signals; Vector rpc_functions; Vector rpc_variables; @@ -623,7 +623,7 @@ public: virtual void get_recognized_extensions(List *p_extensions) const; virtual void get_public_functions(List *p_functions) const; - virtual void get_public_constants(List > *p_constants) const; + virtual void get_public_constants(List> *p_constants) const; virtual void profiling_start(); virtual void profiling_stop(); 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); diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h index 9a2a42b160..6ff00cf0a6 100644 --- a/modules/visual_script/visual_script_editor.h +++ b/modules/visual_script/visual_script_editor.h @@ -133,10 +133,10 @@ class VisualScriptEditor : public ScriptEditorBase { String name; Variant::Type ret; bool ret_variant; - Vector > args; + Vector> args; }; - HashMap > node_styles; + HashMap> node_styles; StringName edited_func; StringName default_func; @@ -153,7 +153,7 @@ class VisualScriptEditor : public ScriptEditorBase { struct Clipboard { - Map > nodes; + Map> nodes; Map nodes_positions; Set sequence_connections; diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index ea09c82013..41c1ea4ca2 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -3519,7 +3519,7 @@ VisualScriptConstructor::VisualScriptConstructor() { type = Variant::NIL; } -static Map > constructor_map; +static Map> constructor_map; static Ref create_constructor_node(const String &p_name) { -- cgit v1.2.3