diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 13:23:58 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 16:54:55 +0200 |
commit | 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch) | |
tree | a27e497da7104dd0a64f98a04fa3067668735e91 /scene/main/shader_globals_override.cpp | |
parent | 710b34b70227becdc652b4ae027fe0ac47409642 (diff) | |
download | redot-engine-0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a.tar.gz |
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.
This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.
There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).
Part of #33027.
Diffstat (limited to 'scene/main/shader_globals_override.cpp')
-rw-r--r-- | scene/main/shader_globals_override.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/scene/main/shader_globals_override.cpp b/scene/main/shader_globals_override.cpp index 272cea8f2b..ebfc34b9c7 100644 --- a/scene/main/shader_globals_override.cpp +++ b/scene/main/shader_globals_override.cpp @@ -35,7 +35,6 @@ #include "scene/scene_string_names.h" StringName *ShaderGlobalsOverride::_remap(const StringName &p_name) const { - StringName *r = param_remaps.getptr(p_name); if (!r) { //not cached, do caching @@ -50,7 +49,6 @@ StringName *ShaderGlobalsOverride::_remap(const StringName &p_name) const { return r; } bool ShaderGlobalsOverride::_set(const StringName &p_name, const Variant &p_value) { - StringName *r = _remap(p_name); if (r) { @@ -75,7 +73,6 @@ bool ShaderGlobalsOverride::_set(const StringName &p_name, const Variant &p_valu } bool ShaderGlobalsOverride::_get(const StringName &p_name, Variant &r_ret) const { - StringName *r = _remap(p_name); if (r) { @@ -90,7 +87,6 @@ bool ShaderGlobalsOverride::_get(const StringName &p_name, Variant &r_ret) const } void ShaderGlobalsOverride::_get_property_list(List<PropertyInfo> *p_list) const { - Vector<StringName> variables; variables = RS::get_singleton()->global_variable_get_list(); for (int i = 0; i < variables.size(); i++) { @@ -198,7 +194,6 @@ void ShaderGlobalsOverride::_get_property_list(List<PropertyInfo> *p_list) const pinfo.hint_string = "Cubemap"; } break; default: { - } break; } @@ -221,7 +216,6 @@ void ShaderGlobalsOverride::_get_property_list(List<PropertyInfo> *p_list) const } void ShaderGlobalsOverride::_activate() { - List<Node *> nodes; get_tree()->get_nodes_in_group(SceneStringNames::get_singleton()->shader_overrides_group_active, &nodes); if (nodes.size() == 0) { @@ -242,14 +236,11 @@ void ShaderGlobalsOverride::_activate() { } void ShaderGlobalsOverride::_notification(int p_what) { - if (p_what == Node3D::NOTIFICATION_ENTER_TREE) { - add_to_group(SceneStringNames::get_singleton()->shader_overrides_group); _activate(); } else if (p_what == Node3D::NOTIFICATION_EXIT_TREE) { - if (active) { //remove overrides const StringName *K = nullptr; @@ -269,7 +260,6 @@ void ShaderGlobalsOverride::_notification(int p_what) { } String ShaderGlobalsOverride::get_configuration_warning() const { - if (!active) { return TTR("ShaderGlobalsOverride is not active because another node of the same type is in the scene."); } @@ -278,7 +268,6 @@ String ShaderGlobalsOverride::get_configuration_warning() const { } void ShaderGlobalsOverride::_bind_methods() { - ClassDB::bind_method(D_METHOD("_activate"), &ShaderGlobalsOverride::_activate); } |