Skip to content

Commit 68c887f

Browse files
committed
Bug 3248: Fixed problem introduced by the fix.
1 parent 26c3095 commit 68c887f

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

copasi/function/CEvaluationNodeObject.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ CIssue CEvaluationNodeObject::compile()
140140
return CIssue(CIssue::eSeverity::Error, CIssue::eKind::StructureInvalid);
141141
}
142142

143+
getData();
143144
mRegisteredObjectCN = CRegisteredCommonName(mData.substr(1, mData.length() - 2), mpTree);
144145
mpObject = mpTree->getNodeObject(mRegisteredObjectCN);
145146

@@ -163,7 +164,7 @@ CIssue CEvaluationNodeObject::compile()
163164
{
164165
mpObject = pObject;
165166
mRegisteredObjectCN = mpObject->getCN();
166-
mData = getData();
167+
getData();
167168
}
168169

169170
if (pDataObject->hasFlag(CDataObject::ValueDbl))
@@ -186,8 +187,6 @@ CIssue CEvaluationNodeObject::compile()
186187

187188
return CIssue(CIssue::eSeverity::Error, CIssue::eKind::ValueNotFound);
188189
}
189-
190-
mData = "<" + mRegisteredObjectCN + ">";
191190
}
192191
break;
193192

@@ -229,6 +228,7 @@ CIssue CEvaluationNodeObject::compile()
229228
return CIssue(CIssue::eSeverity::Error, CIssue::eKind::StructureInvalid);
230229
}
231230

231+
getData();
232232
mRegisteredObjectCN = CRegisteredCommonName(mData.substr(1, mData.length() - 2), mpTree);
233233
mpObject = mpTree->getNodeObject(mRegisteredObjectCN);
234234

@@ -362,6 +362,7 @@ std::string CEvaluationNodeObject::getInfix(const std::vector< std::string > & /
362362
switch (mSubType)
363363
{
364364
case SubType::CN:
365+
case SubType::AVOGADRO:
365366
return "<" + mRegisteredObjectCN + ">";
366367
break;
367368

copasi/model/CModelValue.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,14 +430,16 @@ std::string CModelEntity::getExpression() const
430430

431431
CExpression* CModelEntity::getExpressionPtr()
432432
{
433-
if (mpExpression != NULL) mpExpression->updateInfix();
433+
if (mpExpression != NULL)
434+
mpExpression->updateInfix();
434435

435436
return mpExpression;
436437
}
437438

438439
const CExpression* CModelEntity::getExpressionPtr() const
439440
{
440-
if (mpExpression != NULL) mpExpression->updateInfix();
441+
if (mpExpression != NULL)
442+
mpExpression->updateInfix();
441443

442444
return mpExpression;
443445
}

0 commit comments

Comments
 (0)