mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
Avoid iterators for hot paths.
This commit is contained in:
parent
65752c6d39
commit
068a554cc9
@ -65,8 +65,8 @@ public class Animation {
|
||||
this.timelines = timelines;
|
||||
|
||||
timelineIds.clear();
|
||||
for (Timeline timeline : timelines)
|
||||
timelineIds.addAll(timeline.getPropertyIds());
|
||||
for (int i = 0, n = timelines.size; i < n; i++)
|
||||
timelineIds.addAll(timelines.get(i).getPropertyIds());
|
||||
}
|
||||
|
||||
/** Returns true if this animation contains a timeline with any of the specified property IDs. **/
|
||||
|
||||
@ -294,8 +294,11 @@ public class Skeleton {
|
||||
}
|
||||
|
||||
private void sortPathConstraintAttachment (Skin skin, int slotIndex, Bone slotBone) {
|
||||
for (SkinEntry entry : skin.attachments.orderedItems())
|
||||
if (entry.getSlotIndex() == slotIndex) sortPathConstraintAttachment(entry.getAttachment(), slotBone);
|
||||
Object[] entries = skin.attachments.orderedItems().items;
|
||||
for (int i = 0, n = skin.attachments.size; i < n; i++) {
|
||||
SkinEntry entry = (SkinEntry)entries[i];
|
||||
if (entry.slotIndex == slotIndex) sortPathConstraintAttachment(entry.attachment, slotBone);
|
||||
}
|
||||
}
|
||||
|
||||
private void sortPathConstraintAttachment (Attachment attachment, Bone slotBone) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user