Skip to content

Commit 8ed7694

Browse files
committed
awd
1 parent 3d3cf46 commit 8ed7694

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

crates/bevy_ecs/src/world/entity_ref.rs

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -818,21 +818,6 @@ impl<'w> EntityMut<'w> {
818818
}
819819
}
820820

821-
/// # Safety
822-
/// `entity_location` must be within bounds of the given archetype and `entity` must exist inside
823-
/// the archetype
824-
#[inline]
825-
unsafe fn get_component_with_type(
826-
world: &World,
827-
type_id: TypeId,
828-
target: Option<Entity>,
829-
entity: Entity,
830-
location: EntityLocation,
831-
) -> Option<*mut u8> {
832-
let component_id = world.components.get_component_id(type_id)?;
833-
get_component(world, component_id, target, entity, location)
834-
}
835-
836821
/// # Safety
837822
/// `entity_location` must be within bounds of the given archetype and `entity` must exist inside
838823
/// the archetype
@@ -862,20 +847,6 @@ unsafe fn get_component(
862847
}
863848
}
864849

865-
/// # Safety
866-
/// Caller must ensure that `relationship_id` is valid
867-
#[inline]
868-
unsafe fn get_component_and_ticks_with_type(
869-
world: &World,
870-
type_id: TypeId,
871-
target: Option<Entity>,
872-
entity: Entity,
873-
location: EntityLocation,
874-
) -> Option<(*mut u8, *mut ComponentTicks)> {
875-
let component_id = world.components.get_component_id(type_id)?;
876-
get_component_and_ticks(world, component_id, target, entity, location)
877-
}
878-
879850
/// # Safety
880851
/// Caller must ensure that `relationship_id` is valid
881852
#[inline]
@@ -971,6 +942,35 @@ fn contains_component_with_type(
971942
.unwrap_or(false)
972943
}
973944

945+
/// # Safety
946+
/// `entity_location` must be within bounds of the given archetype and `entity` must exist inside
947+
/// the archetype
948+
#[inline]
949+
unsafe fn get_component_with_type(
950+
world: &World,
951+
type_id: TypeId,
952+
target: Option<Entity>,
953+
entity: Entity,
954+
location: EntityLocation,
955+
) -> Option<*mut u8> {
956+
let component_id = world.components.get_component_id(type_id)?;
957+
get_component(world, component_id, target, entity, location)
958+
}
959+
960+
/// # Safety
961+
/// Caller must ensure that `relationship_id` is valid
962+
#[inline]
963+
unsafe fn get_component_and_ticks_with_type(
964+
world: &World,
965+
type_id: TypeId,
966+
target: Option<Entity>,
967+
entity: Entity,
968+
location: EntityLocation,
969+
) -> Option<(*mut u8, *mut ComponentTicks)> {
970+
let component_id = world.components.get_component_id(type_id)?;
971+
get_component_and_ticks(world, component_id, target, entity, location)
972+
}
973+
974974
fn contains_component(
975975
world: &World,
976976
component_id: ComponentId,

0 commit comments

Comments
 (0)