Przeglądaj źródła

[ue] Fix shadowed variables on Clang/GCC.

Mario Zechner 1 rok temu
rodzic
commit
eb2802e366

+ 1 - 2
spine-cpp/spine-cpp/src/spine/Skeleton.cpp

@@ -462,10 +462,9 @@ void Skeleton::getBounds(float &outX, float &outY, float &outWidth,
 	getBounds(outX, outY, outWidth, outHeight, outVertexBuffer, NULL);
 }
 
-static unsigned short quadIndices[] = {0, 1, 2, 2, 3, 0};
-
 void Skeleton::getBounds(float &outX, float &outY, float &outWidth,
 						 float &outHeight, Vector<float> &outVertexBuffer, SkeletonClipping *clipper) {
+	static unsigned short quadIndices[] = {0, 1, 2, 2, 3, 0};
 	float minX = FLT_MAX;
 	float minY = FLT_MAX;
 	float maxX = -FLT_MAX;

BIN
spine-flutter/lib/assets/libspine_flutter.wasm


+ 2 - 2
spine-ue/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineAtlasAsset.cpp

@@ -102,7 +102,7 @@ class UETextureLoader : public TextureLoader {
 	}
 };
 
-UETextureLoader textureLoader;
+UETextureLoader _spineUETextureLoader;
 
 Atlas *USpineAtlasAsset::GetAtlas() {
 	if (!atlas) {
@@ -113,7 +113,7 @@ Atlas *USpineAtlasAsset::GetAtlas() {
 		std::string t = TCHAR_TO_UTF8(*rawData);
 
 		atlas = new (__FILE__, __LINE__)
-				Atlas(t.c_str(), strlen(t.c_str()), "", &textureLoader);
+				Atlas(t.c_str(), strlen(t.c_str()), "", &_spineUETextureLoader);
 	}
 	return this->atlas;
 }