X Tutup
Skip to content

Add checks for integer vectors for integer division warning#110240

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
westenral:add_int_division_warnings
Oct 1, 2025
Merged

Add checks for integer vectors for integer division warning#110240
Repiteo merged 1 commit intogodotengine:masterfrom
westenral:add_int_division_warnings

Conversation

@westenral
Copy link
Contributor

This PR expands the check for integer division to include Vector2i, Vector3i, and Vector4i, if it is decided that those types should be included in the check. Rect2i wasn't included because it doesn't support division. The implementation is very straightforward for now and simply checks if both the left-hand side and right-hand side are integer-based types.
(I'm a newbie; let me know what I missed.)

Fix #110229

@westenral westenral requested a review from a team as a code owner September 3, 2025 21:57
@aaronfranke aaronfranke added this to the 4.6 milestone Sep 3, 2025
Remove warnings for invalid Vectori combinations

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
@westenral westenral force-pushed the add_int_division_warnings branch from 81b7749 to 565e1aa Compare September 4, 2025 14:16
@westenral westenral requested a review from kleonc September 4, 2025 20:21
Copy link
Member

@kleonc kleonc left a comment

Choose a reason for hiding this comment

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

Expanding the warning to vectors makes sense, code looks good.

@Repiteo Repiteo merged commit b9730c0 into godotengine:master Oct 1, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 1, 2025

Thanks! Congratulations on your first merged contribution! 🎉

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.

Vector2i division doesn't give INTEGER_DIVISION warning

4 participants

X Tutup