libprimis
libprimis copied to clipboard
Use `inline` variable constants instead of `extern const`
As of C++17, it is possible to inline
variables in headers, which means they can be defined in headers without being created individually for each compilation unit. This means that the handful of variables declared extern const
can be moved to headers and defined inline
without any meaningful change in the binary code (and an increase in clarity).
Since extern const
is one of the few (formerly) acceptable ways to have extern
in a regular code file, moving these cases to inline
will make it easier to spot remaining extern
declarations which are not supposed to be there (#113).