1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +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

@@ -77,10 +77,9 @@ SSEffects::SSEffects() {
for (int pass = 0; pass < 4; pass++) {
for (int subPass = 0; subPass < sub_pass_count; subPass++) {
int a = pass;
int b = subPass;
int spmap[5]{ 0, 1, 4, 3, 2 };
b = spmap[subPass];
int b = spmap[subPass];
float ca, sa;
float angle0 = (float(a) + float(b) / float(sub_pass_count)) * Math_PI * 0.5f;