Drakynfly / HeartGraph

A generic runtime node graph editor and viewer for Unreal Engine
MIT License
91 stars 16 forks source link

Fix compilation on macOS #23

Closed CrushedPixel closed 8 months ago

CrushedPixel commented 8 months ago

Another round of CLang strictness!


The TEXT macro prepends the u before a text literal, which CLang doesn't like:

0>HeartGraphNodeRegistry.h(104,21): Error  : 'deprecated' attribute requires a string
0>        UE_DEPRECATED(5.4, TEXT("Please use GetGraphNodeClassesForNode or another method of determining a NodeSource's graph node"))
0>                           ^

I checked the UE codebase, they also just use regular strings.


The UE_NODISCARD has to come before the HEART_API to compile on macOS. My apologies, I forgot to mention that yesterday.


If you mark a function as inline (which the FORCEINLINE macro does), you have to define it in the header file. Otherwise, it can't be inlined because the calling code can't see the definition! I removed the FORCEINLINE macro, let me know if you would rather move the code to the header.


Finally, CLang requires you to specify the template arguments of friend classes. No inference or generic matching allowed, so I figured out the right template arguments to use!