VkalVrtCore : re-organise towards having more std .h (header files) code layout
VkalVrtCore : re-organise towards having a more standard header and impl layout.
So to allow changing things into one place since before one has to find all repeated extern declarations
of the same functions in the various units.
This MR does not have any new code but is a 1st step in trying to refactor a bit
-
Try to reduce the number of functions marked as
extern
in the .cxx files. As it was before to change one function one should find all places it might be declared as extern. Aka was not a single header and a single cxx file. -
Remember that by default the declaration and definition of functions have
extern
prepended with them. The exter does not change by including a header. Some external symbol needs to be provided. We just do not repeat the declaration multiple times. -
For now create one .h to have the declaration implemented by each
.cxx
and include them when needed. So more or less we do not need to see much more declaration than before. -
In cases where the functions were obviously "internal" they were put in an anonymous namespace. This is equivalent to "static in cxx " so not "extern" (static here comes with internal linkage). This needs extra action as is not the default. This can actually help with opt as the compiler and linker know something extra.
-
There are a few member function turned static. Static for member functions is more like a function inside a namespace (another meaning)
-
Mark a few "obvious" things as inline
-
fabs
-->std::abs
-
And a 1st run of clang-tidy
Stop to take stock. There will prb a few followup iterations
ping @vkost, @ssnyder , @abarton . This is something I had discussed with them but wanted to wait for a bit quieter period.