Skip to content

Commit

Permalink
Bug 3248: Fixed compilation of CEvaluationNodeObject.
Browse files Browse the repository at this point in the history
  • Loading branch information
shoops committed Jun 25, 2024
1 parent e16e81f commit e8cd4cc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions copasi/function/CEvaluationNodeObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ CEvaluationNodeObject::CEvaluationNodeObject(const SubType & subType,
{
mPrecedence = PRECEDENCE_NUMBER;
mValueType = ValueType::Number;

switch (subType)
{
case SubType::INVALID:
Expand All @@ -70,13 +70,10 @@ CEvaluationNodeObject::CEvaluationNodeObject(const SubType & subType,
mSubType = SubType::AVOGADRO;
}

mRegisteredObjectCN = CRegisteredCommonName(mData.substr(1, mData.length() - 2), nullptr);

break;

case SubType::AVOGADRO:
mData = "<Reference=Avogadro Constant>";
mRegisteredObjectCN = CRegisteredCommonName(mData.substr(1, mData.length() - 2), nullptr);
break;

case SubType::POINTER:
Expand Down Expand Up @@ -139,6 +136,7 @@ CIssue CEvaluationNodeObject::compile()
return CIssue(CIssue::eSeverity::Error, CIssue::eKind::StructureInvalid);
}

mRegisteredObjectCN = CRegisteredCommonName(mData.substr(1, mData.length() - 2), mpTree);
mpObject = mpTree->getNodeObject(mRegisteredObjectCN);

const CDataObject * pDataObject = CObjectInterface::DataObject(mpObject);
Expand Down Expand Up @@ -227,7 +225,8 @@ CIssue CEvaluationNodeObject::compile()
return CIssue(CIssue::eSeverity::Error, CIssue::eKind::StructureInvalid);
}

mpObject = mpTree->getNodeObject(mData.substr(1, mData.length() - 2));
mRegisteredObjectCN = CRegisteredCommonName(mData.substr(1, mData.length() - 2), mpTree);
mpObject = mpTree->getNodeObject(mRegisteredObjectCN);

if (mpObject != NULL)
{
Expand Down Expand Up @@ -332,6 +331,7 @@ const CEvaluationNode::Data & CEvaluationNodeObject::getData() const
switch (mSubType)
{
case SubType::CN:
case SubType::AVOGADRO:
const_cast< CEvaluationNodeObject * >(this)->mData = "<" + mRegisteredObjectCN + ">";
break;

Expand Down

0 comments on commit e8cd4cc

Please sign in to comment.