Skip to content

Commit aacebee

Browse files
authored
Fix error when compile on LINUX ubuntu2204 (#2012)
* fix LINUX compile error for CocosGUIScene.cpp * fix LINUX compile error 'must be interger or enum' for array length
1 parent 9886f7d commit aacebee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/cpp-tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ if(AX_ENABLE_MEDIA)
377377
Source/UITest/CocoStudioGUITest/UIVideoPlayerTest/UIVideoPlayerTest.cpp)
378378
endif()
379379

380-
if(ANDROID OR IOS OR (WINDOWS AND AX_ENABLE_MSEDGE_WEBVIEW2))
380+
if(ANDROID OR IOS OR LINUX OR (WINDOWS AND AX_ENABLE_MSEDGE_WEBVIEW2))
381381
list(APPEND GAME_HEADER
382382
Source/UITest/CocoStudioGUITest/UIWebViewTest/UIWebViewTest.h
383383
)

tests/cpp-tests/Source/DrawNodeExTest/DrawNodeExTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ void DrawNodePictureTest::update(float dt)
585585
{
586586
Color4F color = Color4F(sph_xx[sph_la + 1], sph_yy[sph_la + 1], sph_xx[sph_la + 2], sph_yy[sph_la + 2] * 255);
587587
// color = Color4F(AXRANDOM_0_1(), AXRANDOM_0_1(), AXRANDOM_0_1(), 1);
588-
Vec2* vertices = new Vec2[sph_cmb - 3];
588+
Vec2* vertices = new Vec2[(int)(sph_cmb - 3)];
589589
for (int n = 3; n < sph_cmb; n++)
590590
{
591591
vertices[n - 3] = Vec2(sph_xx[sph_la + n], sph_yy[sph_la + n]);

0 commit comments

Comments
 (0)