From 68c887fb26464e3344e7d522289e6d238f75599d Mon Sep 17 00:00:00 2001 From: Stefan Hoops Date: Thu, 27 Jun 2024 12:43:31 -0400 Subject: [PATCH] Bug 3248: Fixed problem introduced by the fix. --- copasi/function/CEvaluationNodeObject.cpp | 7 ++++--- copasi/model/CModelValue.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/copasi/function/CEvaluationNodeObject.cpp b/copasi/function/CEvaluationNodeObject.cpp index 4073b06b93..724dc509a1 100644 --- a/copasi/function/CEvaluationNodeObject.cpp +++ b/copasi/function/CEvaluationNodeObject.cpp @@ -140,6 +140,7 @@ CIssue CEvaluationNodeObject::compile() return CIssue(CIssue::eSeverity::Error, CIssue::eKind::StructureInvalid); } + getData(); mRegisteredObjectCN = CRegisteredCommonName(mData.substr(1, mData.length() - 2), mpTree); mpObject = mpTree->getNodeObject(mRegisteredObjectCN); @@ -163,7 +164,7 @@ CIssue CEvaluationNodeObject::compile() { mpObject = pObject; mRegisteredObjectCN = mpObject->getCN(); - mData = getData(); + getData(); } if (pDataObject->hasFlag(CDataObject::ValueDbl)) @@ -186,8 +187,6 @@ CIssue CEvaluationNodeObject::compile() return CIssue(CIssue::eSeverity::Error, CIssue::eKind::ValueNotFound); } - - mData = "<" + mRegisteredObjectCN + ">"; } break; @@ -229,6 +228,7 @@ CIssue CEvaluationNodeObject::compile() return CIssue(CIssue::eSeverity::Error, CIssue::eKind::StructureInvalid); } + getData(); mRegisteredObjectCN = CRegisteredCommonName(mData.substr(1, mData.length() - 2), mpTree); mpObject = mpTree->getNodeObject(mRegisteredObjectCN); @@ -362,6 +362,7 @@ std::string CEvaluationNodeObject::getInfix(const std::vector< std::string > & / switch (mSubType) { case SubType::CN: + case SubType::AVOGADRO: return "<" + mRegisteredObjectCN + ">"; break; diff --git a/copasi/model/CModelValue.cpp b/copasi/model/CModelValue.cpp index ea4d2bb1c0..7cef68f57b 100644 --- a/copasi/model/CModelValue.cpp +++ b/copasi/model/CModelValue.cpp @@ -430,14 +430,16 @@ std::string CModelEntity::getExpression() const CExpression* CModelEntity::getExpressionPtr() { - if (mpExpression != NULL) mpExpression->updateInfix(); + if (mpExpression != NULL) + mpExpression->updateInfix(); return mpExpression; } const CExpression* CModelEntity::getExpressionPtr() const { - if (mpExpression != NULL) mpExpression->updateInfix(); + if (mpExpression != NULL) + mpExpression->updateInfix(); return mpExpression; }