From 1cbe69d733d756fb1de1cdf8b66d66ab8266e582 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Sun, 23 Jan 2022 22:27:23 +0100 Subject: [PATCH] Fix formatting. --- spine-cocos2dx/src/spine/SkeletonRenderer.cpp | 11 +++++------ spine-ts/spine-core/src/AssetManagerBase.ts | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/spine-cocos2dx/src/spine/SkeletonRenderer.cpp b/spine-cocos2dx/src/spine/SkeletonRenderer.cpp index a6d3898cc..270c542a4 100644 --- a/spine-cocos2dx/src/spine/SkeletonRenderer.cpp +++ b/spine-cocos2dx/src/spine/SkeletonRenderer.cpp @@ -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(attachment)->getColor().a == 0) + if (static_cast(attachment)->getColor().a == 0) return true; - } - else if (attachmentRTTI.isExactly(MeshAttachment::rtti)) { - if (static_cast(attachment)->getColor().a == 0) + } else if (attachmentRTTI.isExactly(MeshAttachment::rtti)) { + if (static_cast(attachment)->getColor().a == 0) return true; } return false; diff --git a/spine-ts/spine-core/src/AssetManagerBase.ts b/spine-ts/spine-core/src/AssetManagerBase.ts index f8ca20aea..deb8d6fb5 100644 --- a/spine-ts/spine-core/src/AssetManagerBase.ts +++ b/spine-ts/spine-core/src/AssetManagerBase.ts @@ -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) : "";