Skip to content
Snippets Groups Projects
Commit c3cacaa5 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Base some more rules

parent a555e636
No related branches found
No related tags found
1 merge request!458Automatic modernization (clang-tidy --fix)
......@@ -110,15 +110,15 @@ Checks: '
-cppcoreguidelines-explicit-virtual-functions,
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-static-cast-downcast,
-google-explicit-constructor,
-google-readability-avoid-underscore-in-googletest-name,
-google-runtime-references,
-hicpp-explicit-conversions,
-hicpp-member-init,
-hicpp-noexcept-move,
-llvm-qualified-auto,
-misc-non-private-member-variables-in-classes,
-misc-uniqueptr-reset-release,
google-explicit-constructor,
google-readability-avoid-underscore-in-googletest-name,
google-runtime-references,
hicpp-explicit-conversions,
hicpp-member-init,
hicpp-noexcept-move,
llvm-qualified-auto,
misc-non-private-member-variables-in-classes,
misc-uniqueptr-reset-release,
modernize-avoid-bind,
modernize-make-unique,
modernize-pass-by-value,
......
......@@ -24,7 +24,7 @@
class IAxis {
public:
IAxis(std::string name) : m_name(std::move(name)) {}
explicit IAxis(std::string name) : m_name(std::move(name)) {}
IAxis(const IAxis&) = delete;
virtual ~IAxis() {}
......
......@@ -52,7 +52,7 @@ public:
virtual void clip(double lower, double upper) override;
protected:
VariableBinAxis(const std::string& name, size_t nbins = 0);
explicit VariableBinAxis(const std::string& name, size_t nbins = 0);
void setBinBoundaries(const std::vector<double>& bin_boundaries);
virtual void print(std::ostream& ostr) const override;
......
......@@ -29,7 +29,7 @@
class IElement {
public:
IElement(PolMatrices polpair) : m_polpair(std::move(polpair)) {}
explicit IElement(PolMatrices polpair) : m_polpair(std::move(polpair)) {}
protected:
const PolMatrices m_polpair;
......
......@@ -33,11 +33,11 @@ public:
using const_iterator = typename std::vector<T *>::const_iterator;
SafePointerVector() {}
SafePointerVector(const SafePointerVector& other);
SafePointerVector(SafePointerVector&& other);
SafePointerVector(SafePointerVector&& other) noexcept ;
~SafePointerVector() { clear(); }
SafePointerVector& operator=(const SafePointerVector& right);
SafePointerVector& operator=(SafePointerVector&& right);
SafePointerVector& operator=(SafePointerVector&& right) noexcept ;
size_t size() const { return m_pointers.size(); }
bool empty() const { return m_pointers.empty(); }
void push_back(T* pointer) { m_pointers.push_back(pointer); }
......@@ -64,7 +64,7 @@ template <class T> SafePointerVector<T>::SafePointerVector(const SafePointerVect
template <class T>
SafePointerVector<T>::SafePointerVector(SafePointerVector<T>&& other)
: m_pointers(std::move(other.m_pointers))
noexcept : m_pointers(std::move(other.m_pointers))
{
}
......@@ -81,7 +81,7 @@ SafePointerVector<T>& SafePointerVector<T>::operator=(const SafePointerVector<T>
template <class T>
SafePointerVector<T>& SafePointerVector<T>::operator=(SafePointerVector<T>&& right)
{
noexcept {
clear();
m_pointers = std::move(right.m_pointers);
right.m_pointers.clear();
......
......@@ -31,7 +31,7 @@ public:
#ifndef SWIG
//! Constructor from matrix (no checks if this is an element of SO(3)!)
Transform3D(Eigen::Matrix3d matrix);
explicit Transform3D(Eigen::Matrix3d matrix);
#endif
//! Destructor
......
......@@ -988,7 +988,7 @@ C++ includes: SafePointerVector.h
%feature("docstring") SafePointerVector::SafePointerVector "SafePointerVector< T >::SafePointerVector(const SafePointerVector &other)
";
%feature("docstring") SafePointerVector::SafePointerVector "SafePointerVector< T >::SafePointerVector(SafePointerVector &&other)
%feature("docstring") SafePointerVector::SafePointerVector "SafePointerVector< T >::SafePointerVector(SafePointerVector &&other) noexcept
";
%feature("docstring") SafePointerVector::~SafePointerVector "SafePointerVector< T >::~SafePointerVector()
......
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