diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-06-27 01:05:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 01:05:18 +0200 |
commit | eaaff9da3178fa515a0f051fda932c1dd04d53db (patch) | |
tree | 56173535c376e0324f89baccf4bc14b2580ead23 /editor/plugins/visual_shader_editor_plugin.cpp | |
parent | d8c96461183f0dc3208c3d624674fa4544212ea5 (diff) | |
parent | 4e5310cc60dc17e5ef09e57115ca8236544679e4 (diff) | |
download | redot-engine-eaaff9da3178fa515a0f051fda932c1dd04d53db.tar.gz |
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
Diffstat (limited to 'editor/plugins/visual_shader_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index bfb005cd0b..ddf49aa9ea 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -158,10 +158,7 @@ bool VisualShaderEditor::_is_available(int p_mode) { p_mode = temp_mode; } - if (p_mode != -1 && ((p_mode & current_mode) == 0)) { - return false; - } - return true; + return (p_mode == -1 || (p_mode & current_mode) != 0); } void VisualShaderEditor::_update_options_menu() { |