sahrk / DGGRID

A command-line application that generates and manipulates icosahedral discrete global grids.
GNU Affero General Public License v3.0
78 stars 26 forks source link

Namespaces #50

Open r-barnes opened 2 years ago

r-barnes commented 2 years ago

DGGRID has a few namespace issues that make it a little difficult to work with.

dgconstants.h, for instance, defines a M_2PI in the global namespace. This has caused conflicts with M_2PI from <math.h>. While we can remove the M_2PI constant in #48, the issue wouldn't arise of DGGRID was entirely wrapped in namespace dgg {}.

There are also header files containing using namespace within their global namespaces - this is considered a bad practice (see this for explanations).

At some point it might be nice to clean up these namespace issues in dglib to make it easier to integrate into other code.