mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
clang-tidy modernize-use-default-member-init and modernize-use-emplace (#3190)
* run clang-tidy with modernize-use-default-member-init * results from modernize-use-emplace * one uniform initialization per line otherwise SWIG is unhappy Co-authored-by: Brian Kelley <fustigator@gmail.com>
This commit is contained in:
@@ -17,13 +17,8 @@ class RDKIT_DISTGEOMETRY_EXPORT ChiralViolationContrib
|
||||
: public ForceFields::ForceFieldContrib {
|
||||
public:
|
||||
ChiralViolationContrib()
|
||||
: d_idx1(0),
|
||||
d_idx2(0),
|
||||
d_idx3(0),
|
||||
d_idx4(0),
|
||||
d_volLower(0.0),
|
||||
d_volUpper(0.0),
|
||||
d_weight(0.0){};
|
||||
|
||||
{};
|
||||
|
||||
//! Constructor
|
||||
/*!
|
||||
@@ -93,10 +88,10 @@ class RDKIT_DISTGEOMETRY_EXPORT ChiralViolationContrib
|
||||
}
|
||||
|
||||
private:
|
||||
unsigned int d_idx1, d_idx2, d_idx3, d_idx4;
|
||||
double d_volLower;
|
||||
double d_volUpper;
|
||||
double d_weight;
|
||||
unsigned int d_idx1{0}, d_idx2{0}, d_idx3{0}, d_idx4{0};
|
||||
double d_volLower{0.0};
|
||||
double d_volUpper{0.0};
|
||||
double d_weight{0.0};
|
||||
};
|
||||
} // namespace DistGeom
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class RDKIT_DISTGEOMETRY_EXPORT DistViolationContrib
|
||||
: public ForceFields::ForceFieldContrib {
|
||||
public:
|
||||
DistViolationContrib()
|
||||
: d_end1Idx(0), d_end2Idx(0), d_ub(1000.0), d_lb(0.0), d_weight(1.0){};
|
||||
{};
|
||||
|
||||
//! Constructor
|
||||
/*!
|
||||
@@ -43,10 +43,10 @@ class RDKIT_DISTGEOMETRY_EXPORT DistViolationContrib
|
||||
};
|
||||
|
||||
private:
|
||||
unsigned int d_end1Idx, d_end2Idx; //!< indices of end points
|
||||
double d_ub; //!< upper bound on the distance between d_end1Idx,d_end2Idx
|
||||
double d_lb; //!< lower bound on the distance between d_end1Idx,d_end2Idx
|
||||
double d_weight; //!< used to adjust relative contribution weights
|
||||
unsigned int d_end1Idx{0}, d_end2Idx{0}; //!< indices of end points
|
||||
double d_ub{1000.0}; //!< upper bound on the distance between d_end1Idx,d_end2Idx
|
||||
double d_lb{0.0}; //!< lower bound on the distance between d_end1Idx,d_end2Idx
|
||||
double d_weight{1.0}; //!< used to adjust relative contribution weights
|
||||
};
|
||||
} // namespace DistGeom
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace DistGeom {
|
||||
class RDKIT_DISTGEOMETRY_EXPORT FourthDimContrib
|
||||
: public ForceFields::ForceFieldContrib {
|
||||
public:
|
||||
FourthDimContrib() : d_idx(0), d_weight(0.0){};
|
||||
FourthDimContrib() {};
|
||||
|
||||
//! Constructor
|
||||
/*!
|
||||
@@ -57,8 +57,8 @@ class RDKIT_DISTGEOMETRY_EXPORT FourthDimContrib
|
||||
};
|
||||
|
||||
private:
|
||||
unsigned int d_idx;
|
||||
double d_weight;
|
||||
unsigned int d_idx{0};
|
||||
double d_weight{0.0};
|
||||
};
|
||||
} // namespace DistGeom
|
||||
|
||||
|
||||
Reference in New Issue
Block a user