1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Code simplifications

CPPcheck found most of them.

no need to assign the variable twice:
- AnimationTrackEditTypeAudio
- SSEffects

variable is assigned in all if-else clauses:
- EditorHelp
- AndroidInputHandler
- MenuBar
- ShaderCompiler

same if clause:
- ItemList

clearing an empty bitfield has no effect:
- Viewport
This commit is contained in:
Markus Sauermann
2023-06-09 17:00:50 +02:00
parent f2ce0b6741
commit 890fdd56df
8 changed files with 6 additions and 14 deletions

View File

@@ -308,7 +308,7 @@ void EditorHelp::_add_type(const String &p_type, const String &p_enum, bool p_is
bool can_ref = !p_type.contains("*") || is_enum_type;
String link_t = p_type; // For links in metadata
String display_t = link_t; // For display purposes
String display_t; // For display purposes.
if (is_enum_type) {
link_t = p_enum; // The link for enums is always the full enum description
display_t = _contextualize_class_specifier(p_enum, edited_class);