From 4edb0305b9ac0823ec240e58d3ad23487faa81f4 Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Tue, 4 Feb 2020 17:21:41 +1300 Subject: [PATCH] Some minor cleaning up. --- src/plugins/support/CellMLSupport/src/cellmlfileruntime.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/support/CellMLSupport/src/cellmlfileruntime.cpp b/src/plugins/support/CellMLSupport/src/cellmlfileruntime.cpp index 5ead645fc6..2712b55799 100644 --- a/src/plugins/support/CellMLSupport/src/cellmlfileruntime.cpp +++ b/src/plugins/support/CellMLSupport/src/cellmlfileruntime.cpp @@ -526,9 +526,9 @@ void CellmlFileRuntime::update(CellmlFile *pCellmlFile, bool pAll) // 'computed' constants if (InitializationStatementRegEx.match(initConst).hasMatch()) { - initConsts += (initConsts.isEmpty()?QString():"\n")+initConst; + initConsts += QString("%1").arg(initConsts.isEmpty()?"":"\n")+initConst; } else { - compCompConsts += (compCompConsts.isEmpty()?QString():"\n")+initConst; + compCompConsts += QString("%1").arg(compCompConsts.isEmpty()?"":"\n")+initConst; } } @@ -940,7 +940,7 @@ QString CellmlFileRuntime::cleanCode(const std::wstring &pCode) for (const auto &code : QString::fromStdWString(pCode).split("\r\n")) { if (!CommentRegEx.match(code.trimmed()).hasMatch()) { - res += (res.isEmpty()?QString():"\n")+code; + res += QString("%1").arg(res.isEmpty()?"":"\n")+code; } }