Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary value assignments throughout the codebase #78538

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

Sauermann
Copy link
Contributor

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

@Sauermann Sauermann requested review from a team as code owners June 21, 2023 20:30
Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, these all make sense

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
@akien-mga akien-mga added this to the 4.2 milestone Jun 21, 2023
@YuriSizov YuriSizov changed the title Code simplifications Remove unnecessary value assignments throughout the codebase Jul 12, 2023
@YuriSizov YuriSizov merged commit 5dff3c4 into godotengine:master Jul 12, 2023
@YuriSizov
Copy link
Contributor

Thanks!

@Sauermann Sauermann deleted the fix-code-simplifications branch July 12, 2023 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants