Skip to content
Snippets Groups Projects
Commit 83a7c23c authored by Rafal Bielski's avatar Rafal Bielski :wave:
Browse files

TrigOutputHandling: clang-tidy suggestions and small improvements

Apply a set of small changes and slight refactoring of the code driven mainly
by clang-tidy warnings.

The addressed warnings (not always all cases, only where reasonable):
* use `= default` to define a trivial destructor [modernize-use-equals-default]
* use `using` instead of `typedef` [modernize-use-using]
* implicit conversions of pointers to `bool` [readability-implicit-bool-conversion]
* implicit conversion from `bool` to `char` [readability-implicit-bool-conversion]
* pass by value and use `std::move` [modernize-pass-by-value]
* use nullptr [modernize-use-nullptr]
* all parameters should be named in a function [readability-named-parameter]
* implement the "[rule of five](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rc-five)" for `BareDataBucket` [cppcoreguidelines-special-member-functions]
* implement the "[rule of zero](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rc-zero)" for `TriggerEDMSerialiserTool::Address`
* local copy of a variable never modified -> avoid the copy [performance-unnecessary-copy-initialization]
* some methods could be made static member functions or anonymous-namespace functions [readability-convert-member-functions-to-static]
* constructor does not initialize some fields [cppcoreguidelines-pro-type-member-init]
* use `empty()` instead of `size()==0` [readability-container-size-empty]
* some improvements to memory allocation, avoid `new` if possible [cppcoreguidelines-owning-memory]
* do not use 'else' after 'return' [readability-else-after-return]
* function has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
* use a const reference instead of copy as loop variable [performance-for-range-copy]
* use `dynamic_cast` instead of `static_cast` to downcast from a base to a derived class [cppcoreguidelines-pro-type-static-cast-downcast]
* use single-character overload of `string::find` when searching for a single character [performance-faster-string-find]
* `const` values in declarations do not affect the signature of a function, so they should not be put there [readability-avoid-const-params-in-decls]
parent a0bb1b41
No related branches found
No related tags found
Loading
Showing
with 173 additions and 190 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment