Skip to content

Commit

Permalink
Some minor cleaning up.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Feb 4, 2020
1 parent 889a505 commit 4edb030
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plugins/support/CellMLSupport/src/cellmlfileruntime.cpp
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 4edb030

Please sign in to comment.