Update increment_change_tick to return a strongly-typed Tick (#8295)
# Objective While migrating the engine to use the `Tick` type in #7905, I forgot to update `UnsafeWorldCell::increment_change_tick`. ## Solution Update the function. --- ## Changelog - The function `UnsafeWorldCell::increment_change_tick` is now strongly-typed, returning a value of type `Tick` instead of a raw `u32`. ## Migration Guide The function `UnsafeWorldCell::increment_change_tick` is now strongly-typed, returning a value of type `Tick` instead of a raw `u32`.
This commit is contained in:
parent
09f1bd0be7
commit
086db6d22f
@ -202,12 +202,10 @@ impl<'w> UnsafeWorldCell<'w> {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn increment_change_tick(self) -> u32 {
|
||||
pub fn increment_change_tick(self) -> Tick {
|
||||
// SAFETY:
|
||||
// - we only access world metadata
|
||||
unsafe { self.world_metadata() }
|
||||
.change_tick
|
||||
.fetch_add(1, Ordering::AcqRel)
|
||||
unsafe { self.world_metadata() }.increment_change_tick()
|
||||
}
|
||||
|
||||
/// Shorthand helper function for getting the [`ArchetypeComponentId`] for a resource.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user