New issue

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

clang-tidy nit: proj_trans has inconsistent declaration #842

Closed
schwehr opened this Issue Mar 6, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@schwehr
Contributor

schwehr commented Mar 6, 2018

readability-inconsistent-declaration-parameter-name:

function 'proj_trans' has 1 other declaration with different parameter names
src/proj_internal.h:76:12: the 1st inconsistent declaration seen here
src/proj_internal.h:76:12: differing parameters are named here: ('obs'), in the other declaration: ('coord')

I see:

egrep 'PJ_COORD +proj_trans +[(]' *
proj.h:PJ_COORD proj_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coord);
proj_4D_api.c:PJ_COORD proj_trans (PJ *P, PJ_DIRECTION direction, PJ_COORD coo) {
proj_internal.h:PJ_COORD   proj_trans   (PJ *P, PJ_DIRECTION direction, PJ_COORD obs);
@kbevers

This comment has been minimized.

Member

kbevers commented Mar 6, 2018

Nice catch.

I don't think there's any reason for declaring the function in proj_internal.h actually. Otherwise coo should be replaced by coord.

kbevers added a commit to kbevers/proj.4 that referenced this issue Mar 8, 2018

Use consistent names for PJ_COORD's in declarations
Changes use of 'PJ_COORD coo' to 'PJ_COORD coord' so that variable names in
public function prototypes are consistent.

Closes OSGeo#842.

kbevers added a commit to kbevers/proj.4 that referenced this issue Mar 8, 2018

Use consistent names for PJ_COORD's in declarations
Changes use of 'PJ_COORD coo' to 'PJ_COORD coord' so that variable names in
public function prototypes are consistent.

Closes OSGeo#842.

@kbevers kbevers closed this in #844 Mar 9, 2018

kbevers added a commit that referenced this issue Mar 9, 2018

Use consistent names for PJ_COORD's in declarations
Changes use of 'PJ_COORD coo' to 'PJ_COORD coord' so that variable names in
public function prototypes are consistent.

Closes #842.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment