Tencent / sluaunreal

lua dev plugin for unreal engine 4 or 5
Other
1.71k stars 411 forks source link

Fix shadow compiling error under MSVC 14.29.30133 #585

Closed liubai01 closed 3 months ago

liubai01 commented 3 months ago

Fix compiling error causing by shadowing.

Using Visual Studio 2019 14.29.30148 toolchain (E:\VS\VC\Tools\MSVC\14.29.30133) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).

slua_unreal/Source/slua_unreal/Private/LuaNet.cpp(139): error C4456: declaration of 'classReplicatedPtr' hides previous local declaration
tencent-adm commented 3 months ago

CLA assistant check
All committers have signed the CLA.

zjhongxian commented 3 months ago

auto& classReplicated = *classLuaReplicatedMap.Add(cls, new ClassLuaReplicated()); classReplicated.ownerProperty = prop;

直接改为这样好了?

liubai01 commented 3 months ago

合理。改这种方式吧