diff --git a/.clang-tidy b/.clang-tidy index b34d484da73f65c362e874c2bd7b317a5d9db7f1..02bd88151c5c420d8d465ff253ccb812b8a1ffb7 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -51,6 +51,7 @@ Checks: ' -fuchsia-trailing-return, -google-build-using-namespace, -google-default-arguments, +-google-explicit-constructor, -google-readability-casting, -google-readability-todo, -google-runtime-int, @@ -110,7 +111,6 @@ clang-analyzer-optin.cplusplus.VirtualCall, 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, diff --git a/Base/Axis/IAxis.h b/Base/Axis/IAxis.h index de41b692c1d86f237a3d7e57b72def0819f51c2a..6810ebf8d426b67ab30d879667f351c7c5a2f50a 100644 --- a/Base/Axis/IAxis.h +++ b/Base/Axis/IAxis.h @@ -24,7 +24,7 @@ class IAxis { public: - explicit IAxis(std::string name) : m_name(std::move(name)) {} + IAxis(std::string name) : m_name(std::move(name)) {} IAxis(const IAxis&) = delete; virtual ~IAxis() = default; diff --git a/Fit/Tools/MultiOption.h b/Fit/Tools/MultiOption.h index 996967a335e133782a097c1106c19fc4ae5147d2..c7f663fe812bdeeb3047b0b6658d4e88be498d6b 100644 --- a/Fit/Tools/MultiOption.h +++ b/Fit/Tools/MultiOption.h @@ -29,10 +29,10 @@ class MultiOption { public: using variant_t = std::variant<int, double, std::string>; - explicit MultiOption(std::string name = ""); + MultiOption(std::string name = ""); template <typename T> - explicit MultiOption(const std::string& name, const T& t, const std::string& descripion = ""); + MultiOption(const std::string& name, const T& t, const std::string& descripion = ""); std::string name() const; diff --git a/Param/Distrib/Distributions.h b/Param/Distrib/Distributions.h index 676685668a99563cfd878c96cce76b5bda8f3631..896b7ed380c08604e65c51e71da8e90b507ec925 100644 --- a/Param/Distrib/Distributions.h +++ b/Param/Distrib/Distributions.h @@ -91,7 +91,7 @@ public: inline static const std::string class_name = "DistributionGate"; std::string className() const final { return class_name; } - explicit DistributionGate(std::vector<double> P); + DistributionGate(std::vector<double> P); DistributionGate(double min, double max); DistributionGate(); @@ -131,7 +131,7 @@ public: inline static const std::string class_name = "DistributionLorentz"; std::string className() const final { return class_name; } - explicit DistributionLorentz(std::vector<double> P); + DistributionLorentz(std::vector<double> P); DistributionLorentz(double mean, double hwhm); DistributionLorentz(); @@ -170,7 +170,7 @@ public: inline static const std::string class_name = "DistributionGaussian"; std::string className() const final { return class_name; } - explicit DistributionGaussian(std::vector<double> P); + DistributionGaussian(std::vector<double> P); DistributionGaussian(double mean, double std_dev); DistributionGaussian(); @@ -212,7 +212,7 @@ public: inline static const std::string class_name = "DistributionLogNormal"; std::string className() const final { return class_name; } - explicit DistributionLogNormal(std::vector<double> P); + DistributionLogNormal(std::vector<double> P); DistributionLogNormal(double median, double scale_param); DistributionLogNormal* clone() const override @@ -254,7 +254,7 @@ public: inline static const std::string class_name = "DistributionCosine"; std::string className() const final { return class_name; } - explicit DistributionCosine(std::vector<double> P); + DistributionCosine(std::vector<double> P); DistributionCosine(double mean, double sigma); DistributionCosine(); @@ -293,7 +293,7 @@ public: inline static const std::string class_name = "DistributionTrapezoid"; std::string className() const final { return class_name; } - explicit DistributionTrapezoid(std::vector<double> P); + DistributionTrapezoid(std::vector<double> P); DistributionTrapezoid(double center, double left, double middle, double right); DistributionTrapezoid(); diff --git a/Param/Distrib/ParameterSample.h b/Param/Distrib/ParameterSample.h index 3213fb4a1e77f20aebf3719b45261f049aec4d0d..c57c667c904e50c8ec878f06a1dc88cbf859f52c 100644 --- a/Param/Distrib/ParameterSample.h +++ b/Param/Distrib/ParameterSample.h @@ -19,7 +19,7 @@ class ParameterSample { public: - explicit ParameterSample(double _value = 0., double _weight = 1.) + ParameterSample(double _value = 0., double _weight = 1.) : value(_value), weight(_weight) { }