some
This commit is contained in:
@@ -37,7 +37,7 @@ DEFINE_INTERNAL_CALL(MObject*) UtilsInternal_ExtractArrayFromList(MObject* obj)
|
||||
|
||||
//#if USE_NETCORE
|
||||
//APgI_TYPEDEF() typedef MString* ManagedString;
|
||||
API_TYPEDEF() typedef String* ManagedString;
|
||||
API_TYPEDEF() typedef const String& ManagedString;
|
||||
//#endif
|
||||
|
||||
DEFINE_INTERNAL_CALL(void) PlatformInternal_MemoryCopy(void* dst, const void* src, uint64 size)
|
||||
@@ -58,11 +58,14 @@ DEFINE_INTERNAL_CALL(int32) PlatformInternal_MemoryCompare(const void* buf1, con
|
||||
DEFINE_INTERNAL_CALL(void) DebugLogHandlerInternal_LogWrite(LogType level, ManagedString msgObj)
|
||||
{
|
||||
#if LOG_ENABLE
|
||||
|
||||
#if USE_NETCORE
|
||||
if (msgObj.IsEmpty())
|
||||
return;
|
||||
StringView msg(msgObj);
|
||||
#else
|
||||
if (msgObj == nullptr)
|
||||
return;
|
||||
#if USE_NETCORE
|
||||
StringView msg(*msgObj);
|
||||
#else
|
||||
StringView msg;
|
||||
MUtils::ToString(msgObj, msg);
|
||||
#endif
|
||||
@@ -73,11 +76,15 @@ DEFINE_INTERNAL_CALL(void) DebugLogHandlerInternal_LogWrite(LogType level, Manag
|
||||
DEFINE_INTERNAL_CALL(void) DebugLogHandlerInternal_Log(LogType level, ManagedString msgObj, ScriptingObject* obj, ManagedString stackTrace)
|
||||
{
|
||||
#if LOG_ENABLE
|
||||
|
||||
#if USE_NETCORE
|
||||
if (msgObj.IsEmpty())
|
||||
return;
|
||||
StringView msg(msgObj);
|
||||
#else
|
||||
if (msgObj == nullptr)
|
||||
return;
|
||||
#if USE_NETCORE
|
||||
StringView msg(*msgObj);
|
||||
#else
|
||||
|
||||
// Get info
|
||||
StringView msg;
|
||||
MUtils::ToString(msgObj, msg);
|
||||
@@ -135,11 +142,13 @@ namespace
|
||||
DEFINE_INTERNAL_CALL(void) ProfilerInternal_BeginEvent(ManagedString nameObj)
|
||||
{
|
||||
#if COMPILE_WITH_PROFILER
|
||||
#if USE_NETCORE
|
||||
if (nameObj.IsEmpty())
|
||||
return;
|
||||
StringView name(nameObj);
|
||||
#else
|
||||
if (nameObj == nullptr)
|
||||
return;
|
||||
#if USE_NETCORE
|
||||
StringView name(*nameObj);
|
||||
#else
|
||||
StringView name;
|
||||
MUtils::ToString(nameObj, name);
|
||||
#endif
|
||||
@@ -198,10 +207,12 @@ DEFINE_INTERNAL_CALL(void) ProfilerInternal_BeginEventGPU(ManagedString nameObj)
|
||||
{
|
||||
#if COMPILE_WITH_PROFILER
|
||||
#if USE_NETCORE
|
||||
if (nameObj.IsEmpty())
|
||||
return;
|
||||
const StringView nameChars(nameObj);
|
||||
#else
|
||||
if (nameObj == nullptr)
|
||||
return;
|
||||
const StringView nameChars(*nameObj);
|
||||
#else
|
||||
const StringView nameChars = MCore::String::GetChars(nameObj);
|
||||
#endif
|
||||
const auto index = ProfilerGPU::BeginEvent(nameChars.Get());
|
||||
|
||||
Reference in New Issue
Block a user