pret / pokeruby

Decompilation of Pokémon Ruby/Sapphire
799 stars 225 forks source link

Unnest if statements #790

Closed ghost closed 4 years ago

ghost commented 4 years ago

Overall, it is generally considered bad style to continually nest loops. However, if this is what the decompiler outputted, then why bother touching it?

However, this can be rewritten as returning early if the playtime is less than 60.

This code look looks better, has the same output, and is easier to understand.

PikalaxALT commented 4 years ago

Please observe the following etiquette when proposing changes: