From f32f6851442b12a5e3a079a5768239e2e05fb9e2 Mon Sep 17 00:00:00 2001 From: bofeng Date: Fri, 6 Dec 2024 14:57:33 +0800 Subject: [PATCH] refine --- cocos/spine/skeleton-data.ts | 2 +- .../cocos/editor-support/spine-wasm/spine-skeleton-instance.cpp | 2 +- .../cocos/editor-support/spine-wasm/spine-skeleton-instance.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos/spine/skeleton-data.ts b/cocos/spine/skeleton-data.ts index cc5bfb69367..2b9e21ba241 100644 --- a/cocos/spine/skeleton-data.ts +++ b/cocos/spine/skeleton-data.ts @@ -214,7 +214,7 @@ export class SkeletonData extends Asset { this._skeletonCache = spData; } else { const size = this.textures.length; - let textureUUIDs = [] as string[]; + const textureUUIDs = [] as string[]; for (let i = 0; i < size; ++i) { textureUUIDs.push(this.textures[i].uuid); } diff --git a/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.cpp b/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.cpp index 8cf8222c77d..bebcf166fe2 100644 --- a/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.cpp +++ b/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.cpp @@ -503,7 +503,7 @@ void SpineSkeletonInstance::resizeSlotRegion(const spine::String &slotName, uint } } -void SpineSkeletonInstance::setSlotTexture(const spine::String &slotName, spine::String textureID) { +void SpineSkeletonInstance::setSlotTexture(const spine::String &slotName, const spine::String& textureID) { if (!_skeleton) return; auto* slot = _skeleton->findSlot(slotName); if (!slot) return; diff --git a/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.h b/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.h index 1fbc7a95a16..a8ff816f6ae 100644 --- a/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.h +++ b/native/cocos/editor-support/spine-wasm/spine-skeleton-instance.h @@ -54,7 +54,7 @@ class SpineSkeletonInstance { void onTrackEntryEvent(spine::TrackEntry *entry, spine::EventType type, spine::Event *event); inline spine::Vector &getDebugShapes() { return _debugShapes; } void resizeSlotRegion(const spine::String &slotName, uint32_t width, uint32_t height, bool createNew = false); - void setSlotTexture(const spine::String &slotName, spine::String textureID); + void setSlotTexture(const spine::String &slotName, const spine::String& textureID); void destroy(); bool isCache{false}; bool enable{true};