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

Beautify #2467

Merged
merged 3 commits into from
Jul 11, 2024
Merged

Beautify #2467

merged 3 commits into from
Jul 11, 2024

Commits on Jul 9, 2024

  1. Eliminate a numLayers variable

    The compiler is smart enough that referencing
    a local variable is not any faster than len(srcInfos).
    
    If anything, keeping the extra variable might add to register pressure
    because the compiler might not understand that the srcInfos change due to
    LayerInfosForCopy does not change the number of layers.
    
    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    1c586a8 View commit details
    Browse the repository at this point in the history
  2. Eliminate a single-use variable

    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    871cdd3 View commit details
    Browse the repository at this point in the history
  3. Narrow down the scope of a variable

    Otherwise "err" refers to a variable outside of this closure,
    not even to the one used by the immediate caller.
    
    Should not change behavior.
    
    Signed-off-by: Miloslav Trmač <[email protected]>
    mtrmac committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    22b11d1 View commit details
    Browse the repository at this point in the history