-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
[Core] Add missing HashMapComparatorDefault
cases
#97550
Conversation
We should probably add these as methods on Done: |
Realized Could probably add for the following as well:
Matching the code in But unsure if these are necessary or used |
HashMapComparatorDefault<Vector4>
HashMapComparatorDefault
for Vector4
, Quaternion
, and Color
d0a45e4
to
29c2261
Compare
I'd go ahead and add it for all of the Variant math structs; don't see any real reason not to do so. |
Will do! It'll ensure complete stability |
Added for: * `AABB` * `Basis` * `Color` * `Plane` * `Projection` * `Quaternion` * `Rect2` * `Transform2D` * `Transform3D` * `Vector4` Ensures these handles `NaN` correctly
29c2261
to
75cb353
Compare
HashMapComparatorDefault
for Vector4
, Quaternion
, and Color
HashMapComparatorDefault
cases
template <> | ||
struct HashMapComparatorDefault<Rect2> { | ||
static bool compare(const Rect2 &p_lhs, const Rect2 &p_rhs) { | ||
return HashMapComparatorDefault<Vector2>().compare(p_lhs.position, p_rhs.position) && HashMapComparatorDefault<Vector2>().compare(p_lhs.size, p_rhs.size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delegated here to avoid very complex expressions (will hopefully be unnecessary with #97553)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#97553 will make any extra verbosity irrelevant, so this works as-is.
Thanks! |
Thank you! |
Added for:
AABB
Basis
Color
Plane
Projection
Quaternion
Rect2
Transform2D
Transform3D
Vector4
Ensures these handle
NaN
correctly