Optimize C# bindings in Engine code to static functions that native ABI matches managed signature
This commit is contained in:
@@ -180,7 +180,22 @@ void CodeEditingManager::OpenSolution(CodeEditorTypes editorType)
|
||||
const auto editor = GetCodeEditor(editorType);
|
||||
if (editor)
|
||||
{
|
||||
OpenSolution(editor);
|
||||
// Ensure that no async task is running
|
||||
if (IsAsyncOpenRunning())
|
||||
{
|
||||
// TODO: enqueue action and handle many actions in the queue
|
||||
LOG(Warning, "Cannot use code editor during async open action.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (editor->UseAsyncForOpen())
|
||||
{
|
||||
AsyncOpenTask::OpenSolution(editor);
|
||||
}
|
||||
else
|
||||
{
|
||||
editor->OpenSolution();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -201,26 +216,6 @@ void CodeEditingManager::OnFileAdded(CodeEditorTypes editorType, const String& p
|
||||
}
|
||||
}
|
||||
|
||||
void CodeEditingManager::OpenSolution(CodeEditor* editor)
|
||||
{
|
||||
// Ensure that no async task is running
|
||||
if (IsAsyncOpenRunning())
|
||||
{
|
||||
// TODO: enqueue action and handle many actions in the queue
|
||||
LOG(Warning, "Cannot use code editor during async open action.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (editor->UseAsyncForOpen())
|
||||
{
|
||||
AsyncOpenTask::OpenSolution(editor);
|
||||
}
|
||||
else
|
||||
{
|
||||
editor->OpenSolution();
|
||||
}
|
||||
}
|
||||
|
||||
void OnAsyncBegin(Thread* thread)
|
||||
{
|
||||
ASSERT(AsyncOpenThread == nullptr);
|
||||
|
||||
Reference in New Issue
Block a user