diff --git a/Source/Engine/Platform/Apple/ApplePlatform.cpp b/Source/Engine/Platform/Apple/ApplePlatform.cpp index bbb08ddaf..c6c689195 100644 --- a/Source/Engine/Platform/Apple/ApplePlatform.cpp +++ b/Source/Engine/Platform/Apple/ApplePlatform.cpp @@ -2,8 +2,12 @@ #if PLATFORM_MAC || PLATFORM_IOS -#define PLATFORM_MAC_CACHED PLATFORM_MAC -#define PLATFORM_IOS_CACHED PLATFORM_IOS +#if PLATFORM_MAC +#define PLATFORM_MAC_CACHED 1 +#endif +#if PLATFORM_IOS +#define PLATFORM_IOS_CACHED 1 +#endif #include "ApplePlatform.h" #include "AppleUtils.h" @@ -54,8 +58,23 @@ #endif // System includes break those defines -#define PLATFORM_MAC PLATFORM_MAC_CACHED -#define PLATFORM_IOS PLATFORM_IOS_CACHED +#undef PLATFORM_MAC +#if PLATFORM_MAC_CACHED +#define PLATFORM_MAC 1 +#else +#define PLATFORM_MAC 0 +#endif +#undef PLATFORM_IOS +#if PLATFORM_IOS_CACHED +#define PLATFORM_IOS 1 +#else +#define PLATFORM_IOS 0 +#endif + +#if PLATFORM_IOS +#include +extern "C" int proc_pid_rusage(int pid, int flavor, rusage_info_t *buffer) __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0); +#endif CPUInfo Cpu; String UserLocale; diff --git a/Source/Engine/Scripting/Runtime/DotNet.cpp b/Source/Engine/Scripting/Runtime/DotNet.cpp index ce5f315f1..24e07859d 100644 --- a/Source/Engine/Scripting/Runtime/DotNet.cpp +++ b/Source/Engine/Scripting/Runtime/DotNet.cpp @@ -2272,7 +2272,7 @@ void ShutdownHostfxr() #endif } -void* GetStaticMethodPointer(const String& methodName) +void* GetStaticMethodPointer(StringView methodName) { void* fun; if (CachedFunctions.TryGet(methodName, fun))