Commit Graph

4 Commits

Author SHA1 Message Date
Jamie Dale
4afb7ce6bb Made EName an enum class to prevent implicit conversion to int
The following code would call the int overload rather than the name overload when passed an EName constant, which could easily lead to confusion and bugs:
    using FMyId = uint8;
    void DoThing(FName);
    void DoThing(FMyId);
    DoThing(NAME_Actor);

The change to use enum class requires that any code that actually deals with EName as an int (mostly internal name code and serialisation) be updated to explicitly cast, but prevents the implicit conversion that causes the issue above.

In order to preserve the NAME_X aliases that the old-style enum added to the global scope, new aliases have been added that point to the EName scoped versions. Unfortunately these can cause shadowing warnings if NAME_X is defined in the local scope, as the old-style enum used to allow that without shadowing, however there is no way to prevent this so we'll just need to fix any warnings that occur.

#rb Johan.Torp
#preflight 6087e06349a9840001414708

[CL 16126708 by Jamie Dale in ue5-main branch]
2021-04-27 10:11:18 -04:00
Mieszko Zielinski
0086e5603d Fixed var shadowing in MLAdapterManager_Client.cpp
horde issue #62517

#rb trivial
#jira none

[CL 15976899 by Mieszko Zielinski in ue5-main branch]
2021-04-12 08:58:22 -04:00
Mieszko Zielinski
213029cad3 UE4ML->MLAdapter rename follow up fixes
#rb trivial
#jira UE-111024
#jira UE-111021
#jira UE-111018
#jira UE-111014
#jira UE-110969

[CL 15975907 by Mieszko Zielinski in ue5-main branch]
2021-04-12 04:15:52 -04:00
mieszko zielinski
7848b68be0 Renamed UE4ML plugin to MLAdapter and updated all its contents accordingly
#lockdown nick.whiting
[at]Nick.Whiting, [at]Mikko.Mononen
#rb Nick.Whiting, Mikko.Mononen
#jira UE-111731
#jira UE-111119
#jira UE-111117
#jira UE-111114
#jira UE-111091
#jira UE-111075
#jira UE-111060
#jira UE-111058
#jira UE-111049
#jira UE-111044
#jira UE-111040
#jira UE-111039
#jira UE-111038
#jira UE-111036
#jira UE-111033
#jira UE-111032
#jira UE-111029
#jira UE-111026
#jira UE-111024
#jira UE-111021
#jira UE-111020
#jira UE-111018
#jira UE-111017
#jira UE-111016
#jira UE-111015
#jira UE-111014
#jira UE-111013
#jira UE-111012
#jira UE-110977
#jira UE-110975
#jira UE-110974
#jira UE-110973
#jira UE-110971
#jira UE-110969
#jira UE-110965
#jira UE-110949
#preflight 606ebe61db0bbb00016e242e

#ROBOMERGE-OWNER: mieszko.zielinski
#ROBOMERGE-AUTHOR: mieszko.zielinski
#ROBOMERGE-SOURCE: CL 15955453 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v787-15839533)
#ROBOMERGE-CONFLICT from-shelf

[CL 15975769 by mieszko zielinski in ue5-main branch]
2021-04-12 03:41:10 -04:00