diff options
| author | Hein-Pieter van Braam | 2017-09-02 22:32:31 +0200 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2017-09-08 15:03:53 +0200 |
| commit | b2a38854fdde296fd2d7da139a29b23a18ab494d (patch) | |
| tree | 951326f4d966e01d4f8d4402dc7beb2252560b7a /editor/plugins/shader_editor_plugin.cpp | |
| parent | d1cb73b47a17de830d9474026ffa7b3587cfbc68 (diff) | |
| download | godot-b2a38854fdde296fd2d7da139a29b23a18ab494d.tar.gz godot-b2a38854fdde296fd2d7da139a29b23a18ab494d.tar.zst godot-b2a38854fdde296fd2d7da139a29b23a18ab494d.zip | |
Fix unused variable warnings
The forth in my quest to make Godot 3.x compile with -Werror on GCC7
Diffstat (limited to 'editor/plugins/shader_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index b02016c27..1b02f18d8 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -164,6 +164,8 @@ void ShaderTextEditor::_code_complete_script(const String &p_code, List<String> String calltip; Error err = sl.complete(p_code, ShaderTypes::get_singleton()->get_functions(VisualServer::ShaderMode(shader->get_mode())), ShaderTypes::get_singleton()->get_modes(VisualServer::ShaderMode(shader->get_mode())), ShaderTypes::get_singleton()->get_types(), r_options, calltip); + if (err != OK) + ERR_PRINT("Shaderlang complete failed"); if (calltip != "") { get_text_edit()->set_code_hint(calltip); @@ -403,13 +405,7 @@ void ShaderEditorPlugin::edit(Object *p_object) { bool ShaderEditorPlugin::handles(Object *p_object) const { - bool handles = true; Shader *shader = Object::cast_to<Shader>(p_object); - /* - if (Object::cast_to<ShaderGraph>(shader)) // Don't handle ShaderGraph's - handles = false; - */ - return shader != NULL; } |
