Skip to content

Conversation

@joto
Copy link
Collaborator

@joto joto commented Dec 8, 2019

This is the second batch of changes after #1020 switching the return type of some functions from int to void where the result is never used.

auto const &rel = rels_buffer.get<osmium::Relation>(0);
return pgsql_process_relation(rel);
pgsql_process_relation(rel);
return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new way makes clear that pgsql_process_relation doesn't return anything. If we ever change the function this is in to return something again, this new code will break regardless of whether pgsql_process_relation returns something or not, helping us to detect that there is a place here that needs looking at.

@lonvia lonvia merged commit 3ca9ed5 into osm2pgsql-dev:master Dec 8, 2019
@joto joto deleted the int-to-void-2 branch December 12, 2019 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants