Conversation
Lestropie
left a comment
There was a problem hiding this comment.
LGTM.
Tried restarting the clang-tidy job, but I've a suspicion it'll time out again because of the number of files to check. Feel free to merge without it.
The log message says:
However, I think this issue is independent of the changes in this PR so it should be safe to merge regardless (indeed same can be seen in #2865 https://github.com/MRtrix3/mrtrix3/actions/runs/8558271362/job/23452463438?pr=2865) |
Was mistakenly removed in #2871
Was mistakenly removed in #2871
- Stop usage of C-style string data and functions; can be viewed as an exhaustive extension of #2911. - Ensure that "#pragma one" is used instead of the historical "#ifndef __headerpath__", as introduced in #2871. - Enforce use of nested namespaces, as first introduced in #2652. - Enforce explicit resolution of MR::abs() for templated data types; where data types are exclusively scalar floating-point, std::fabs() is instead used. - Preclude use of C-style casts, as proposed in #3010. - Add to MR namespace "NaNF" and "InfF" as floating-point variants of the already-defined default_type "NaN" and "Inf", and preclude use of macros "NAN" and "INFINITY" in favour of either one of those or std::numeric_limits<>, as proposed in #3192. - Preclude use of "NULL" macro, replacing with nullptr.
Proposal to replace header include guards with
#pragma once. This means less typing and lines of code, less distractions and less chances of symbol collisions (caused by same values used by guard values).It would also address most of the issue outlined #2862.
Migration from include guards was done using guardonce. The only manual change needed was to address the following in
core/fixel/legacy/image.h: