diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-09-26 11:22:59 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2018-09-27 10:29:48 +0200 |
commit | 2b084352b9d2fbbc56414e75bf1091361f8cb496 (patch) | |
tree | 9c143cac550a9a1e083f365d75fd9dfacfe55d87 /modules | |
parent | 2893b5a6bee1f1185c52d4a46734b2741acbb52c (diff) |
Fix warnings on non-static data member initializers (C++11 feature)
We're not formally using C++11 yet so those trigger compilation warnings
(at least with GCC 5):
./main/input_default.h:122:30: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
CursorShape default_shape = CURSOR_ARROW;
^
Note: We may allow those eventually (especially for non-int static const),
but most of current occurrences were inconsistent with all other classes.
See also http://www.stroustrup.com/C++11FAQ.html#member-init
Diffstat (limited to 'modules')
4 files changed, 5 insertions, 3 deletions
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 1027c74f34..4736556d6a 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -3496,6 +3496,7 @@ VisualScriptEditor::VisualScriptEditor() { clipboard = memnew(Clipboard); } updating_graph = false; + seq_connect = false; edit_menu = memnew(MenuButton); edit_menu->set_text(TTR("Edit")); diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h index b0bf971630..541ee941fb 100644 --- a/modules/visual_script/visual_script_editor.h +++ b/modules/visual_script/visual_script_editor.h @@ -37,6 +37,7 @@ #include "scene/gui/graph_edit.h" #include "visual_script.h" #include "visual_script_property_selector.h" + class VisualScriptEditorSignalEdit; class VisualScriptEditorVariableEdit; @@ -159,7 +160,7 @@ class VisualScriptEditor : public ScriptEditorBase { MemberType member_type; String member_name; - bool seq_connect = false; + bool seq_connect; PortAction port_action; int port_action_node; diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp index 9942d5baa6..67143b41e2 100644 --- a/modules/visual_script/visual_script_property_selector.cpp +++ b/modules/visual_script/visual_script_property_selector.cpp @@ -721,6 +721,7 @@ VisualScriptPropertySelector::VisualScriptPropertySelector() { search_options->set_hide_root(true); search_options->set_hide_folding(true); virtuals_only = false; + seq_connect = false; help_bit = memnew(EditorHelpBit); vbc->add_margin_child(TTR("Description:"), help_bit); help_bit->connect("request_hide", this, "_closed"); diff --git a/modules/visual_script/visual_script_property_selector.h b/modules/visual_script/visual_script_property_selector.h index 917ef9ae6d..f974ee3355 100644 --- a/modules/visual_script/visual_script_property_selector.h +++ b/modules/visual_script/visual_script_property_selector.h @@ -63,8 +63,7 @@ class VisualScriptPropertySelector : public ConfirmationDialog { ObjectID script; Object *instance; bool virtuals_only; - - bool seq_connect = false; + bool seq_connect; void _item_selected(); |