From 2f63d97acbc9c92a75f4f75e43ebdf152e240919 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Thu, 6 Mar 2025 11:02:42 -0500 Subject: Make the Workflow::Clone name optional and update the docs. --- binaryninjaapi.h | 4 ++-- plugins/msvc_rtti/plugin.cpp | 2 +- python/workflow.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/binaryninjaapi.h b/binaryninjaapi.h index ceb42937..a0ad6980 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -10098,11 +10098,11 @@ namespace BinaryNinja { /*! Clone a workflow, copying all Activities and the execution strategy - \param name Name for the new Workflow + \param name If specified, name the new Workflow, otherwise the name is copied from the original \param activity If specified, perform the clone with `activity` as the root \return A new Workflow */ - Ref Clone(const std::string& name, const std::string& activity = ""); + Ref Clone(const std::string& name = "", const std::string& activity = ""); /*! Register an Activity with this Workflow diff --git a/plugins/msvc_rtti/plugin.cpp b/plugins/msvc_rtti/plugin.cpp index 226c14fa..ee3ebb32 100644 --- a/plugins/msvc_rtti/plugin.cpp +++ b/plugins/msvc_rtti/plugin.cpp @@ -52,7 +52,7 @@ extern "C" { // TODO: 2. Identify if the function is unique to a class, renaming and retyping if true // TODO: 3. Identify functions which address a VFT and are probably a constructor (alloc use), retyping if true // TODO: 4. Identify functions which address a VFT and are probably a deconstructor (free use), retyping if true - Ref msvcMetaWorkflow = Workflow::Instance("core.module.metaAnalysis")->Clone("core.module.metaAnalysis"); + Ref msvcMetaWorkflow = Workflow::Instance("core.module.metaAnalysis")->Clone(); // Add RTTI analysis. msvcMetaWorkflow->RegisterActivity(R"~({ diff --git a/python/workflow.py b/python/workflow.py index 7b4bae38..7eed81c1 100644 --- a/python/workflow.py +++ b/python/workflow.py @@ -354,7 +354,7 @@ class Workflow(metaclass=_WorkflowMetaclass): """ ``clone`` Clone a new Workflow, copying all Activities and the execution strategy. - :param str name: the name for the new Workflow + :param str name: if specified, name the new Workflow, otherwise the name is copied from the original :param str activity: if specified, perform the clone operation using ``activity`` as the root :return: a new Workflow :rtype: Workflow -- cgit v1.3.1