Skip to content

Commit

Permalink
Fixed update errors for non-meta updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
drolbr committed Sep 13, 2017
1 parent 29d72e7 commit 79d24ed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/overpass_api/osm-backend/node_updater.cc
Expand Up @@ -482,7 +482,7 @@ void Node_Updater::update(Osm_Backend_Callback* callback, Cpu_Stopwatch* cpu_sto
transaction = new Nonsynced_Transaction(true, false, db_dir, "");

// Prepare collecting all data of existing skeletons
std::sort(new_data.data.begin(), new_data.data.end());
std::stable_sort(new_data.data.begin(), new_data.data.end());
if (meta == keep_attic)
remove_time_inconsistent_versions(new_data);
else
Expand Down
10 changes: 5 additions & 5 deletions src/overpass_api/osm-backend/relation_updater.cc
Expand Up @@ -443,7 +443,7 @@ void compute_geometry
if (it2 != new_node_idx_by_id.end())
member_idxs.push_back(it2->second.ll_upper);
else
std::cerr<<"Node "<<nit->ref.val()<<" used in relation "<<it->elem.id.val()<<" not found.\n";
std::cerr<<"compute_geometry: Node "<<nit->ref.val()<<" used in relation "<<it->elem.id.val()<<" not found.\n";
}
else if (nit->type == Relation_Entry::WAY)
{
Expand All @@ -452,7 +452,7 @@ void compute_geometry
if (it2 != new_way_idx_by_id.end())
member_idxs.push_back(it2->second.val());
else
std::cerr<<"Way "<<nit->ref.val()<<" used in relation "<<it->elem.id.val()<<" not found.\n";
std::cerr<<"compute_geometry: Way "<<nit->ref.val()<<" used in relation "<<it->elem.id.val()<<" not found.\n";
}
}

Expand Down Expand Up @@ -517,7 +517,7 @@ void compute_idx_and_geometry
// Otherwise the node has expired before our relation - something has gone wrong seriously.
}
else
std::cerr<<"Node "<<mit->ref.val()<<" used in relation "<<skeleton.id.val()<<" not found.\n";
std::cerr<<"compute_idx_and_geometry: Node "<<mit->ref.val()<<" used in relation "<<skeleton.id.val()<<" not found.\n";
// Otherwise the node is not contained in our list - something has gone wrong seriously.
}
else if (mit->type == Relation_Entry::WAY)
Expand All @@ -536,7 +536,7 @@ void compute_idx_and_geometry
// Otherwise the way has expired before our relation - something has gone wrong seriously.
}
else
std::cerr<<"Way "<<mit->ref.val()<<" used in relation "<<skeleton.id.val()<<" not found.\n";
std::cerr<<"compute_idx_and_geometry: Way "<<mit->ref.val()<<" used in relation "<<skeleton.id.val()<<" not found.\n";
// Otherwise the way is not contained in our list - something has gone wrong seriously.
}
}
Expand Down Expand Up @@ -1071,7 +1071,7 @@ void Relation_Updater::update(Osm_Backend_Callback* callback, Cpu_Stopwatch* cpu
transaction = new Nonsynced_Transaction(true, false, db_dir, "");

// Prepare collecting all data of existing skeletons
std::sort(new_data.data.begin(), new_data.data.end());
std::stable_sort(new_data.data.begin(), new_data.data.end());
if (meta == keep_attic)
remove_time_inconsistent_versions(new_data);
else
Expand Down
8 changes: 4 additions & 4 deletions src/overpass_api/osm-backend/way_updater.cc
Expand Up @@ -84,7 +84,7 @@ void compute_idx_and_geometry
// Otherwise the node has expired before our way - something has gone wrong seriously.
}
else
std::cerr<<"Node "<<it->val()<<" used in way "<<skeleton.id.val()<<" not found.\n";
std::cerr<<"compute_idx_and_geometry: Node "<<it->val()<<" used in way "<<skeleton.id.val()<<" not found.\n";
// Otherwise the node is not contained in our list - something has gone wrong seriously.
}

Expand Down Expand Up @@ -605,7 +605,7 @@ void compute_geometry
if (it2 != new_node_idx_by_id.end())
nd_idxs.push_back(it2->second.ll_upper);
else
std::cerr<<"Node "<<nit->val()<<" used in way "<<it->elem.id.val()<<" not found.\n";
std::cerr<<"compute_geometry: Node "<<nit->val()<<" used in way "<<it->elem.id.val()<<" not found.\n";
}

Uint31_Index index = Way::calc_index(nd_idxs);
Expand Down Expand Up @@ -662,7 +662,7 @@ void new_implicit_skeletons
if (it3 != new_node_idx_by_id.end())
nd_idxs.push_back(it3->second.ll_upper);
else
std::cerr<<"Node "<<nit->val()<<" used in way "<<it2->id.val()<<" not found.\n";
std::cerr<<"new_implicit_skeletons: Node "<<nit->val()<<" used in way "<<it2->id.val()<<" not found.\n";
}

Uint31_Index index = Way::calc_index(nd_idxs);
Expand Down Expand Up @@ -800,7 +800,7 @@ void Way_Updater::update(Osm_Backend_Callback* callback, Cpu_Stopwatch* cpu_stop
transaction = new Nonsynced_Transaction(true, false, db_dir, "");

// Prepare collecting all data of existing skeletons
std::sort(new_data.data.begin(), new_data.data.end());
std::stable_sort(new_data.data.begin(), new_data.data.end());
if (meta == keep_attic)
remove_time_inconsistent_versions(new_data);
else
Expand Down

0 comments on commit 79d24ed

Please sign in to comment.