Skip to content

Commit

Permalink
Fix formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Jan 23, 2022
1 parent 463938b commit 1cbe69d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions spine-cocos2dx/src/spine/SkeletonRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,23 +908,22 @@ namespace spine {
return startSlotIndex > index || endSlotIndex < index;
}

bool nothingToDraw(Slot& slot, int startSlotIndex, int endSlotIndex) {
bool nothingToDraw(Slot &slot, int startSlotIndex, int endSlotIndex) {
Attachment *attachment = slot.getAttachment();
if (!attachment ||
slotIsOutRange(slot, startSlotIndex, endSlotIndex) ||
!slot.getBone().isActive())
return true;
const auto& attachmentRTTI = attachment->getRTTI();
const auto &attachmentRTTI = attachment->getRTTI();
if (attachmentRTTI.isExactly(ClippingAttachment::rtti))
return false;
if (slot.getColor().a == 0)
return true;
if (attachmentRTTI.isExactly(RegionAttachment::rtti)) {
if (static_cast<RegionAttachment*>(attachment)->getColor().a == 0)
if (static_cast<RegionAttachment *>(attachment)->getColor().a == 0)
return true;
}
else if (attachmentRTTI.isExactly(MeshAttachment::rtti)) {
if (static_cast<MeshAttachment*>(attachment)->getColor().a == 0)
} else if (attachmentRTTI.isExactly(MeshAttachment::rtti)) {
if (static_cast<MeshAttachment *>(attachment)->getColor().a == 0)
return true;
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion spine-ts/spine-core/src/AssetManagerBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class AssetManagerBase implements Disposable {
loadTextureAtlas (path: string,
success: (path: string, atlas: TextureAtlas) => void = null,
error: (path: string, message: string) => void = null,
fileAlias: {[keyword:string] : string} = null
fileAlias: { [keyword: string]: string } = null
) {
let index = path.lastIndexOf("/");
let parent = index >= 0 ? path.substring(0, index + 1) : "";
Expand Down

0 comments on commit 1cbe69d

Please sign in to comment.