diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2020-06-13 00:01:53 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2020-06-13 00:01:53 -0300 |
commit | 6c0e98a2727d07e1fbb38b78c27d68e98ad09465 (patch) | |
tree | 12764ca986c9a1943bc2012b0cc751471773f6ee /Project/ControlElementSolver.cpp | |
parent | 196389a70ef3a03aa8764b9532812a17dd55014b (diff) | |
download | PSP.git-6c0e98a2727d07e1fbb38b78c27d68e98ad09465.tar.gz PSP.git-6c0e98a2727d07e1fbb38b78c27d68e98ad09465.tar.xz PSP.git-6c0e98a2727d07e1fbb38b78c27d68e98ad09465.zip |
Device context implemented
Diffstat (limited to 'Project/ControlElementSolver.cpp')
-rw-r--r-- | Project/ControlElementSolver.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Project/ControlElementSolver.cpp b/Project/ControlElementSolver.cpp index 31c18e9..147d517 100644 --- a/Project/ControlElementSolver.cpp +++ b/Project/ControlElementSolver.cpp @@ -321,17 +321,17 @@ ConnectionLine* ControlElementSolver::SolveNextElement(ConnectionLine* currentLi m_inputToSolve[0] = currentLine->GetValue(); m_inputToSolve[1] = m_currentTime; m_inputToSolve[2] = m_switchStatus; - if(!element->Solve(m_inputToSolve, m_timeStep)) return NULL; + if(!element->Solve(m_inputToSolve, m_timeStep)) return nullptr; element->SetSolved(); - // Get the output node (must have one or will result NULL). - Node* outNode = NULL; + // Get the output node (must have one or will result nullptr). + Node* outNode = nullptr; auto nodeList = element->GetNodeList(); for(auto itN = nodeList.begin(), itNEnd = nodeList.end(); itN != itNEnd; ++itN) { Node* node = *itN; if(node->GetNodeType() == Node::NodeType::NODE_OUT) outNode = node; } - if(!outNode) return NULL; + if(!outNode) return nullptr; // Set connection line value associated with the output node. auto childList = element->GetChildList(); @@ -343,8 +343,8 @@ ConnectionLine* ControlElementSolver::SolveNextElement(ConnectionLine* currentLi for(auto itCN = nodeList.begin(), itCNEnd = nodeList.end(); itCN != itCNEnd; ++itCN) { Node* childNode = *itCN; if(childNode == outNode) { - // Check if the line connect two elements, otherwise return NULL - if(cLine->GetType() != ConnectionLine::ConnectionLineType::ELEMENT_ELEMENT) return NULL; + // Check if the line connect two elements, otherwise return nullptr + if(cLine->GetType() != ConnectionLine::ConnectionLineType::ELEMENT_ELEMENT) return nullptr; // Set the connection line value and return it. cLine->SetValue(element->GetOutput()); @@ -357,5 +357,5 @@ ConnectionLine* ControlElementSolver::SolveNextElement(ConnectionLine* currentLi } } } - return NULL; + return nullptr; } |