-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move non-templated function definitions out of header files in mrtrix.h and stats.h #2809
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 50. Check the log or trigger a new build to see more.
else | ||
return text; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: do not use 'else' after 'return' [readability-else-after-return]
else | |
return text; | |
return text; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
return 1; | ||
if (arg[0] == '\0' || arg[1] == '\0' || arg[2] == '\0') | ||
return 0; | ||
const unsigned char *uarg = reinterpret_cast<const unsigned char *>(arg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
const unsigned char *uarg = reinterpret_cast<const unsigned char *>(arg);
^
if (arg[0] == '\0' || arg[1] == '\0' || arg[2] == '\0') | ||
return 0; | ||
const unsigned char *uarg = reinterpret_cast<const unsigned char *>(arg); | ||
if (uarg[0] == 0xE2 && uarg[1] == 0x80 && (uarg[2] >= 0x90 && uarg[2] <= 0x95)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic]
if (uarg[0] == 0xE2 && uarg[1] == 0x80 && (uarg[2] >= 0x90 && uarg[2] <= 0x95))
^
if (arg[0] == '\0' || arg[1] == '\0' || arg[2] == '\0') | ||
return 0; | ||
const unsigned char *uarg = reinterpret_cast<const unsigned char *>(arg); | ||
if (uarg[0] == 0xE2 && uarg[1] == 0x80 && (uarg[2] >= 0x90 && uarg[2] <= 0x95)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic]
if (uarg[0] == 0xE2 && uarg[1] == 0x80 && (uarg[2] >= 0x90 && uarg[2] <= 0x95))
^
if (arg[0] == '\0' || arg[1] == '\0' || arg[2] == '\0') | ||
return 0; | ||
const unsigned char *uarg = reinterpret_cast<const unsigned char *>(arg); | ||
if (uarg[0] == 0xE2 && uarg[1] == 0x80 && (uarg[2] >= 0x90 && uarg[2] <= 0x95)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic]
if (uarg[0] == 0xE2 && uarg[1] == 0x80 && (uarg[2] >= 0x90 && uarg[2] <= 0x95))
^
if (arg[0] == '\0' || arg[1] == '\0' || arg[2] == '\0') | ||
return 0; | ||
const unsigned char *uarg = reinterpret_cast<const unsigned char *>(arg); | ||
if (uarg[0] == 0xE2 && uarg[1] == 0x80 && (uarg[2] >= 0x90 && uarg[2] <= 0x95)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic]
if (uarg[0] == 0xE2 && uarg[1] == 0x80 && (uarg[2] >= 0x90 && uarg[2] <= 0x95))
^
6dad491
to
0faeec3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
Also removes directly used header files
Also removes directly unused header includes
It doesn't really makes sense to return a size_t here.
0faeec3
to
ff98d70
Compare
This PR moves non-templated function definitions to source files from
core/mrtrix.h
andcore/stats.h
. It also removes directly unused header includes in those files.Since these are core header files included in many files, this should improve (at least a little bit) compile times.