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

Canvas renderer: Remove redundant assignment #97089

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

stuartcarnie
Copy link
Contributor

@stuartcarnie stuartcarnie commented Sep 16, 2024

Removes a redundant assignment that could result in bugs if reordered.

The original assignment is here:

shader.quad_index_array = RD::get_singleton()->index_array_create(shader.quad_index_buffer, 0, 6);

and then overwritten by the following lines:

{ //primitive
primitive_arrays.index_array[0] = shader.quad_index_array = RD::get_singleton()->index_array_create(shader.quad_index_buffer, 0, 1);
primitive_arrays.index_array[1] = shader.quad_index_array = RD::get_singleton()->index_array_create(shader.quad_index_buffer, 0, 2);
primitive_arrays.index_array[2] = shader.quad_index_array = RD::get_singleton()->index_array_create(shader.quad_index_buffer, 0, 3);
primitive_arrays.index_array[3] = shader.quad_index_array = RD::get_singleton()->index_array_create(shader.quad_index_buffer, 0, 6);
}

@stuartcarnie stuartcarnie requested a review from a team as a code owner September 16, 2024 20:33
@clayjohn clayjohn added this to the 4.4 milestone Sep 16, 2024
@AThousandShips AThousandShips changed the title 2D: Remove redundant assignment 2: Remove redundant assignment Sep 16, 2024
@AThousandShips AThousandShips changed the title 2: Remove redundant assignment Canvas renderer: Remove redundant assignment Sep 16, 2024
@akien-mga akien-mga merged commit 02b16d2 into godotengine:master Sep 17, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@stuartcarnie stuartcarnie deleted the sgc/remove_assignment branch September 18, 2024 19:39
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.

3 participants