summaryrefslogtreecommitdiffstats
path: root/Project/ControlElementSolver.cpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2020-06-13 00:01:53 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2020-06-13 00:01:53 -0300
commit6c0e98a2727d07e1fbb38b78c27d68e98ad09465 (patch)
tree12764ca986c9a1943bc2012b0cc751471773f6ee /Project/ControlElementSolver.cpp
parent196389a70ef3a03aa8764b9532812a17dd55014b (diff)
downloadPSP.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.cpp14
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;
}