Fix deprecation warning
This commit is contained in:
@@ -71,7 +71,7 @@ String MacUtils::ToString(CFStringRef str)
|
||||
|
||||
CFStringRef MacUtils::ToString(const StringView& str)
|
||||
{
|
||||
return CFStringCreateWithBytes(nullptr, (const UInt8*)str.GetNonTerminatedText(), str.Length() * sizeof(Char), kCFStringEncodingUTF16LE, false);
|
||||
return CFStringCreateWithBytes(nullptr, (const UInt8*)str.GetText(), str.Length() * sizeof(Char), kCFStringEncodingUTF16LE, false);
|
||||
}
|
||||
|
||||
Float2 MacUtils::PosToCoca(const Float2& pos)
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace Flax.Build.Bindings
|
||||
if (typeInfo.Type == "String")
|
||||
return $"(StringView){value}";
|
||||
if (typeInfo.IsPtr && typeInfo.IsConst && typeInfo.Type == "Char")
|
||||
return $"((StringView){value}).GetNonTerminatedText()"; // (StringView)Variant, if not empty, is guaranteed to point to a null-terminated buffer.
|
||||
return $"((StringView){value}).GetText()"; // (StringView)Variant, if not empty, is guaranteed to point to a null-terminated buffer.
|
||||
if (typeInfo.Type == "AssetReference" || typeInfo.Type == "WeakAssetReference" || typeInfo.Type == "SoftAssetReference")
|
||||
return $"ScriptingObject::Cast<{typeInfo.GenericArgs[0].Type}>((Asset*){value})";
|
||||
if (typeInfo.Type == "ScriptingObjectReference" || typeInfo.Type == "SoftObjectReference")
|
||||
|
||||
Reference in New Issue
Block a user