GEOS icon indicating copy to clipboard operation
GEOS copied to clipboard

Mark all functions declared in a cpp file static.

Open corbett5 opened this issue 5 years ago • 1 comments

All functions declared in a .cpp file should be static. This tells the compiler that they are only ever called from that cpp file and therefore if it can tell that it's not used we'll get warnings. This will help us remove dead code.

corbett5 avatar Jul 23 '20 19:07 corbett5

And remove static from functions defined in a header.

https://stackoverflow.com/questions/780730/c-c-static-function-in-header-file-what-does-it-mean

corbett5 avatar Jul 23 '20 20:07 corbett5