We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NULL check is done in so many places where it is not required.
eg:- CHECK_NOTNULL(res_node);//there is no operation is done on it just passing to another function.
void FlowGraphManager::UpdateResourceNode( FlowGraphNode* res_node, queue<TDOrNodeWrapper*>* node_queue, unordered_set<uint64_t>* marked_nodes) { CHECK_NOTNULL(res_node); UpdateResOutgoingArcs(res_node, node_queue, marked_nodes); }
void FlowGraphManager::UpdateFlowGraph( queue<TDOrNodeWrapper*>* node_queue, unordered_set<uint64_t>* marked_nodes) { CHECK_NOTNULL(node_queue); CHECK_NOTNULL(marked_nodes); //Not required while (!node_queue->empty()) { TDOrNodeWrapper* cur_node = node_queue->front(); node_queue->pop(); if (!cur_node->node_) { // We're handling a task that doesn't have an associated flow graph node. UpdateChildrenTasks(cur_node->td_ptr_, node_queue, marked_nodes); delete cur_node; continue; } if (cur_node->node_->IsTaskNode()) { UpdateTaskNode(cur_node->node_, node_queue, marked_nodes); UpdateChildrenTasks(cur_node->td_ptr_, node_queue, marked_nodes); } else if (cur_node->node_->IsEquivalenceClassNode()) { UpdateEquivClassNode(cur_node->node_, node_queue, marked_nodes); } else if (cur_node->node_->IsResourceNode()) { UpdateResourceNode(cur_node->node_, node_queue, marked_nodes); } else { LOG(FATAL) << "Unexpected node type: " << cur_node->node_->type_; } delete cur_node; }
Note: have reservation that there are multiple NULL check as well present in the code
The text was updated successfully, but these errors were encountered:
No branches or pull requests
NULL check is done in so many places where it is not required.
eg:- CHECK_NOTNULL(res_node);//there is no operation is done on it just passing to another function.
void FlowGraphManager::UpdateResourceNode(
FlowGraphNode* res_node,
queue<TDOrNodeWrapper*>* node_queue,
unordered_set<uint64_t>* marked_nodes) {
CHECK_NOTNULL(res_node);
UpdateResOutgoingArcs(res_node, node_queue, marked_nodes);
}
void FlowGraphManager::UpdateFlowGraph(
queue<TDOrNodeWrapper*>* node_queue,
unordered_set<uint64_t>* marked_nodes) {
CHECK_NOTNULL(node_queue);
CHECK_NOTNULL(marked_nodes); //Not required
while (!node_queue->empty()) {
TDOrNodeWrapper* cur_node = node_queue->front();
node_queue->pop();
if (!cur_node->node_) {
// We're handling a task that doesn't have an associated flow graph node.
UpdateChildrenTasks(cur_node->td_ptr_, node_queue, marked_nodes);
delete cur_node;
continue;
}
if (cur_node->node_->IsTaskNode()) {
UpdateTaskNode(cur_node->node_, node_queue, marked_nodes);
UpdateChildrenTasks(cur_node->td_ptr_, node_queue, marked_nodes);
} else if (cur_node->node_->IsEquivalenceClassNode()) {
UpdateEquivClassNode(cur_node->node_, node_queue, marked_nodes);
} else if (cur_node->node_->IsResourceNode()) {
UpdateResourceNode(cur_node->node_, node_queue, marked_nodes);
} else {
LOG(FATAL) << "Unexpected node type: " << cur_node->node_->type_;
}
delete cur_node;
}
Note: have reservation that there are multiple NULL check as well present in the code
The text was updated successfully, but these errors were encountered: