-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
Hide IsoSpec using pimpl and add some clang-tidy performance fixes on top #5681
Conversation
…performance-trivially-destructible,performance-noexcept-move-constructor
src/openms/source/ANALYSIS/MRM/ReactionMonitoringTransition.cpp
Outdated
Show resolved
Hide resolved
I see this is helpful, but how does clang know that something cannot throw? |
@@ -214,6 +239,8 @@ namespace OpenMS | |||
return ID; | |||
} | |||
|
|||
IsoSpecThresholdWrapper::~IsoSpecThresholdWrapper() = default; |
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.
Today I learned that in case of these partial types we also need to put the default destructor into the cpp file, In header it fails.
tests passed |
|
||
protected: | ||
IsoSpec::IsoLayeredGenerator ILG; | ||
IsoSpecTotalProbGeneratorWrapper(const IsoSpecTotalProbGeneratorWrapper&) = delete; |
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.
nitpicking here but:
would it make sense to move the copy ctor up into the area of all other ctors?! Just to have them all in one place, in case someone is checking them and sees that this one seems "missing"?
|
||
|
||
protected: | ||
IsoSpec::IsoThresholdGenerator ITG; | ||
IsoSpecThresholdGeneratorWrapper(const IsoSpecThresholdGeneratorWrapper&) = delete; |
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.
same here
Do you mean noexcept? It cannot. We are just promising it does not (or bare the consequences). |
looks fine to me |
@@ -45,17 +46,21 @@ | |||
#include <OpenMS/CHEMISTRY/EmpiricalFormula.h> | |||
#include <OpenMS/CHEMISTRY/ISOTOPEDISTRIBUTION/IsotopeDistribution.h> | |||
|
|||
|
|||
// Override IsoSpec's use of mmap whenever it is available | |||
#define ISOSPEC_GOT_SYSTEM_MMAN false | |||
#define ISOSPEC_GOT_MMAN false | |||
#define ISOSPEC_BUILDING_OPENMS true |
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.
I assume you then also dont need these definitions in the header any more?
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.
Yes I will remove them
rebuild jenkins |
passed |
@cbielow @timosachsenberg yes exactly that was my point, how can clang-tidy automatically add |
I think it checks all called functions for throw. If there is none it adds noexcept. |
Description
clang-tidy fixes
cppcoreguidelines-virtual-class-destructor
misc-redundant-expression,
performance-trivially-destructible
performance-noexcept-move-constructor
Checklist:
How can I get additional information on failed tests during CI:
If your PR is failing you can check out
Note: