Minor improvements
This commit is contained in:
@@ -33,4 +33,6 @@ namespace THelpers
|
||||
};
|
||||
}
|
||||
|
||||
// Utility to execute code from lambda on scope exit (no matter the place with scope arguments capture)
|
||||
// Usage: SCOPE_EXIT{ DoSomething(); };
|
||||
#define SCOPE_EXIT const auto CONCAT_MACROS(__scopeExit, __LINE__) = THelpers::ScopeExitInternal() * [&]()
|
||||
|
||||
@@ -116,7 +116,8 @@ namespace Flax.Build.Bindings
|
||||
else
|
||||
{
|
||||
// Pass as pointer to local variable converted for managed runtime
|
||||
if (paramType.IsPtr)
|
||||
var paramApiType = FindApiTypeInfo(buildData, paramType, caller);
|
||||
if (paramType.IsPtr && (paramApiType == null || !paramApiType.IsScriptingObject))
|
||||
result = string.Format(nativeToManaged, '*' + paramName);
|
||||
contents.Append($" auto __param_{paramName} = {result};").AppendLine();
|
||||
result = $"&__param_{paramName}";
|
||||
|
||||
Reference in New Issue
Block a user