constexpr the let user{} format string

This commit is contained in:
Marek Roszko 2024-04-12 22:48:34 -04:00
parent 0675c62a24
commit 161cfbacd4
1 changed files with 2 additions and 2 deletions

View File

@ -640,7 +640,7 @@ void SIMULATOR_FRAME_UI::LoadSettings( EESCHEMA_SETTINGS* aCfg )
void SIMULATOR_FRAME_UI::SaveSettings( EESCHEMA_SETTINGS* aCfg )
{
EESCHEMA_SETTINGS::SIMULATOR& settings = aCfg->m_Simulator;
settings.view.plot_panel_width = m_splitterLeftRight->GetSashPosition();
settings.view.plot_panel_height = m_splitterPlotAndConsole->GetSashPosition();
settings.view.signal_panel_height = m_splitterSignals->GetSashPosition();
@ -1862,7 +1862,7 @@ void SIMULATOR_FRAME_UI::applyUserDefinedSignals()
for( const auto& [ id, signal ] : m_userDefinedSignals )
{
std::string cmd = "let user{} = {}";
constexpr const char* cmd = "let user{} = {}";
simulator()->Command( "echo " + fmt::format( cmd, id, signal.ToStdString() ) );
simulator()->Command( fmt::format( cmd, id, quoteNetNames( signal ).ToStdString() ) );