Skip to content

Commit

Permalink
Register Hash for glam types (bevyengine#6786)
Browse files Browse the repository at this point in the history
# Objective

- fixes bevyengine#6736

## Solution

- Register `Hash` on all of glam's reflected integer vector types.
  • Loading branch information
lewiszlw authored and ItsDoot committed Feb 1, 2023
1 parent e27304e commit 17f96e1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/bevy_reflect/src/impls/glam.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ use bevy_reflect_derive::{impl_from_reflect_value, impl_reflect_struct, impl_ref
use glam::*;

impl_reflect_struct!(
#[reflect(Debug, PartialEq, Default)]
#[reflect(Debug, Hash, PartialEq, Default)]
struct IVec2 {
x: i32,
y: i32,
}
);
impl_reflect_struct!(
#[reflect(Debug, PartialEq, Default)]
#[reflect(Debug, Hash, PartialEq, Default)]
struct IVec3 {
x: i32,
y: i32,
z: i32,
}
);
impl_reflect_struct!(
#[reflect(Debug, PartialEq, Default)]
#[reflect(Debug, Hash, PartialEq, Default)]
struct IVec4 {
x: i32,
y: i32,
Expand All @@ -31,22 +31,22 @@ impl_reflect_struct!(
);

impl_reflect_struct!(
#[reflect(Debug, PartialEq, Default)]
#[reflect(Debug, Hash, PartialEq, Default)]
struct UVec2 {
x: u32,
y: u32,
}
);
impl_reflect_struct!(
#[reflect(Debug, PartialEq, Default)]
#[reflect(Debug, Hash, PartialEq, Default)]
struct UVec3 {
x: u32,
y: u32,
z: u32,
}
);
impl_reflect_struct!(
#[reflect(Debug, PartialEq, Default)]
#[reflect(Debug, Hash, PartialEq, Default)]
struct UVec4 {
x: u32,
y: u32,
Expand Down

0 comments on commit 17f96e1

Please sign in to comment.