File tree 1 file changed +6
-6
lines changed
crates/bevy_ecs/src/identifier
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -13,37 +13,37 @@ pub(crate) struct IdentifierMask;
13
13
14
14
impl IdentifierMask {
15
15
/// Returns the low component from a `u64` value
16
- #[ inline]
16
+ #[ inline( always ) ]
17
17
pub ( crate ) const fn get_low ( value : u64 ) -> u32 {
18
18
( value & LOW_MASK ) as u32
19
19
}
20
20
21
21
/// Returns the high component from a `u64` value
22
- #[ inline]
22
+ #[ inline( always ) ]
23
23
pub ( crate ) const fn get_high ( value : u64 ) -> u32 {
24
24
( ( value & !LOW_MASK ) >> u32:: BITS ) as u32
25
25
}
26
26
27
27
/// Pack a low and high `u32` values into a single `u64` value.
28
- #[ inline]
28
+ #[ inline( always ) ]
29
29
pub ( crate ) const fn pack_into_u64 ( low : u32 , high : u32 ) -> u64 {
30
30
( ( high as u64 ) << u32:: BITS ) | ( low as u64 )
31
31
}
32
32
33
33
/// Pack the [`IdKind`] bits into a high segment.
34
- #[ inline]
34
+ #[ inline( always ) ]
35
35
pub ( crate ) const fn pack_kind_into_high ( value : u32 , kind : IdKind ) -> u32 {
36
36
value | ( ( kind as u32 ) << 24 )
37
37
}
38
38
39
39
/// Extract the value component from a high segment of an [`super::Identifier`].
40
- #[ inline]
40
+ #[ inline( always ) ]
41
41
pub ( crate ) const fn extract_value_from_high ( value : u32 ) -> u32 {
42
42
value & HIGH_MASK
43
43
}
44
44
45
45
/// Extract the ID kind component from a high segment of an [`super::Identifier`].
46
- #[ inline]
46
+ #[ inline( always ) ]
47
47
pub ( crate ) const fn extract_kind_from_high ( value : u32 ) -> IdKind {
48
48
// The negated HIGH_MASK will extract just the bit we need for kind.
49
49
let kind_mask = !HIGH_MASK ;
You can’t perform that action at this time.
0 commit comments