recommonded updates

This commit is contained in:
Taré Gaskin 2020-07-29 16:27:57 +00:00
parent 3aaf9e186b
commit 25942a2c2b
2 changed files with 7 additions and 7 deletions

View File

@ -236,16 +236,16 @@ StateMap::CondId StateMap::GetCondId(const StateMap::CondState& state) {
}
void StateMap::ResetCondId(const Node* node, StateMap::CondId id) {
const int64 node_to_condid_map_size = node_to_condid_map_.size();
if (node->id() < node_to_condid_map_size)
const int64 node_to_map_size = node_to_condid_map_.size();
if (node->id() < node_to_map_size)
node_to_condid_map_[node->id()] = id;
else
added_node_condid_mapping_[node->id()] = id;
}
StateMap::AncestorId StateMap::LookupAncestorId(const Node* node) const {
const int64 node_to_ancestorid_map_size = node_to_ancestorid_map_.size();
if (node->id() < node_to_ancestorid_map_size)
const int64 node_to_map_size = node_to_ancestorid_map_.size();
if (node->id() < node_to_map_size)
return node_to_ancestorid_map_[node->id()];
return added_node_ancestorid_mapping_.at(node->id());
}
@ -257,8 +257,8 @@ StateMap::AncestorId StateMap::GetAncestorId(
}
void StateMap::ResetAncestorId(const Node* node, StateMap::AncestorId id) {
const int64 node_to_ancestorid_map_size = node_to_ancestorid_map_.size();
if (node->id() < node_to_ancestorid_map_size)
const int64 node_to_map_size = node_to_ancestorid_map_.size();
if (node->id() < node_to_map_size)
node_to_ancestorid_map_[node->id()] = id;
else
added_node_ancestorid_mapping_[node->id()] = id;

View File

@ -146,7 +146,7 @@ Status ReorderOutputEdges(Graph* g, Node* n, int input_count,
int dst_input = e->dst_input();
g->RemoveEdge(e);
if (new_src_output < static_cast<int64>(input_count - resource_input_count)) {
if (new_src_output < input_count - resource_input_count) {
g->AddEdge(n, new_src_output, dst, dst_input);
} else {
const Edge* input_edge;