HoudiniEngineForUnreal-v2 icon indicating copy to clipboard operation
HoudiniEngineForUnreal-v2 copied to clipboard

Simplified getting the asset state as string, removed unused helpers

Open moppius opened this issue 4 years ago • 1 comments
trafficstars

EnumToString was failing to compile on Linux, and these helper functions seem surplus to requirements - they were only used in one place, and it seems neater just to call UEnum::GetValueAsString directly.

This is the Linux build error we hit:

/build/ue4/Engine/Plugins/Runtime/HoudiniEngine/Source/HoudiniEngineRuntime/Private/HoudiniEngineRuntimeUtils.h:173:18: error: no matching function for call to 'FindObject'
                        UEnum* Enum = FindObject<UEnum>(ANY_PACKAGE, *EnumName);
                                      ^~~~~~~~~~~~~~~~~
/build/ue4/Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectGlobals.h:1255:11: note: candidate function template not viable: cannot convert argument of incomplete type 'UPackage *' to 'UObject *' for 1st argument

moppius avatar Jul 08 '21 12:07 moppius

The Linux compile issue seems to be fixed in 2.0.3 somehow, although I notice that the original methods are still there, and still seem to be redundant (why not just use UEnum::GetValueAsString inline?).

Feel free to close this PR if you don't want the change 🙂

moppius avatar Aug 11 '21 15:08 moppius