diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 7d1c072530..deaa33df55 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -285,7 +285,7 @@ bool TOOL_MANAGER::InvokeTool( const std::string& aToolName ) } -bool TOOL_MANAGER::doRunAction( const std::string& aActionName, bool aNow, std::any aParam, +bool TOOL_MANAGER::doRunAction( const std::string& aActionName, bool aNow, const std::any& aParam, COMMIT* aCommit ) { TOOL_ACTION* action = m_actionMgr->FindAction( aActionName ); @@ -320,7 +320,7 @@ VECTOR2D TOOL_MANAGER::GetCursorPosition() const } -bool TOOL_MANAGER::doRunAction( const TOOL_ACTION& aAction, bool aNow, std::any aParam, +bool TOOL_MANAGER::doRunAction( const TOOL_ACTION& aAction, bool aNow, const std::any& aParam, COMMIT* aCommit ) { if( m_shuttingDown ) diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 98e7908796..961d52272f 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -545,8 +545,8 @@ private: /** * Helper function to actually run an action. */ - bool doRunAction( const TOOL_ACTION& aAction, bool aNow, std::any aParam, COMMIT* aCommit ); - bool doRunAction( const std::string& aActionName, bool aNow, std::any aParam, COMMIT* aCommit ); + bool doRunAction( const TOOL_ACTION& aAction, bool aNow, const std::any& aParam, COMMIT* aCommit ); + bool doRunAction( const std::string& aActionName, bool aNow, const std::any& aParam, COMMIT* aCommit ); /** * Pass an event at first to the active tools, then to all others.