Commit c94d2527 authored by Luka Vretenar's avatar Luka Vretenar Committed by Vedran Miletić

Fixed all -Wreorder warnings

parent df8a92cd
......@@ -830,19 +830,19 @@ class isCoordinationNumber_eq : public std::unary_function<RbtAtom *, bool> {
public:
// Total coordination number
explicit isCoordinationNumber_eq(int nn)
: n(nn), eCNType(TOTAL), atNo(0), ffType(""), hybrid(RbtAtom::UNDEFINED) {
: eCNType(TOTAL), n(nn), atNo(0), ffType(""), hybrid(RbtAtom::UNDEFINED) {
}
// Atomic number coordination number
explicit isCoordinationNumber_eq(int nn, int nAt)
: n(nn), eCNType(ATNO), atNo(nAt), ffType(""),
: eCNType(ATNO), n(nn), atNo(nAt), ffType(""),
hybrid(RbtAtom::UNDEFINED) {}
// Force field type coordination number
explicit isCoordinationNumber_eq(int nn, const std::string &strType)
: n(nn), eCNType(FFTYPE), atNo(0), ffType(strType),
: eCNType(FFTYPE), n(nn), atNo(0), ffType(strType),
hybrid(RbtAtom::UNDEFINED) {}
// Hybridisation state coordination number
explicit isCoordinationNumber_eq(int nn, RbtAtom::eHybridState eState)
: n(nn), eCNType(HYBRID), atNo(0), ffType(""), hybrid(eState) {}
: eCNType(HYBRID), n(nn), atNo(0), ffType(""), hybrid(eState) {}
bool operator()(RbtAtom *pAtom) const {
switch (eCNType) {
case TOTAL:
......
......@@ -61,15 +61,15 @@ public:
// Use to create an "error" with status=OK, no line, no file, no message
// All other constructors set the OK flag to false
RbtError()
: m_strName(IDS_OK), m_strFile(""), m_nLine(0), m_strMessage(""),
: m_strName(IDS_OK), m_strFile(""), m_strMessage(""), m_nLine(0),
m_bOK(true) {}
// Parameterised constructor
// Use to create unspecified Rbt Errors
RbtError(const std::string &strFile, int nLine,
const std::string &strMessage = "")
: m_strName(IDS_ERROR), m_strFile(strFile), m_nLine(nLine),
m_strMessage(strMessage), m_bOK(false) {}
: m_strName(IDS_ERROR), m_strFile(strFile), m_strMessage(strMessage),
m_nLine(nLine), m_bOK(false) {}
// Default destructor
virtual ~RbtError() {}
......@@ -100,8 +100,8 @@ protected:
// Protected constructor to allow derived error classes to set error name
RbtError(const std::string &strName, const std::string &strFile, int nLine,
const std::string &strMessage = "")
: m_strName(strName), m_strFile(strFile), m_nLine(nLine),
m_strMessage(strMessage), m_bOK(false) {}
: m_strName(strName), m_strFile(strFile), m_strMessage(strMessage),
m_nLine(nLine), m_bOK(false) {}
///////////////////////
// Private data
......
......@@ -22,7 +22,7 @@
class RbtFFTPeak {
public:
// Constructor
RbtFFTPeak() : index(0), coord(0.0, 0.0, 0.0), volume(0), height(0.0) {}
RbtFFTPeak() : index(0), coord(0.0, 0.0, 0.0), height(0.0), volume(0) {}
// Data attributes - public to avoid need for accessor functions
unsigned int index; // Location of peak maximum - iXYZ index into grid
......
......@@ -21,7 +21,7 @@ class RbtVble {
public:
static std::string _CT;
enum VbleType { CTE, LIG, SCORE, SITE };
RbtVble() : value(0.0), vt(CTE), name("") {
RbtVble() : vt(CTE), value(0.0), name("") {
_RBTOBJECTCOUNTER_CONSTR_(_CT);
} // default const.
RbtVble(std::string s, RbtReturnType val = 0.0) : value(val), name(s) {
......@@ -35,7 +35,7 @@ public:
vt = CTE;
_RBTOBJECTCOUNTER_CONSTR_(_CT);
}
RbtVble(const RbtVble &v) : value(v.value), vt(v.vt), name(v.name) {
RbtVble(const RbtVble &v) : vt(v.vt), value(v.value), name(v.name) {
_RBTOBJECTCOUNTER_COPYCONSTR_(_CT);
}
void SetValue(RbtReturnType val) {
......
......@@ -23,17 +23,17 @@
// Initialise 2-D attributes to suitable defaults
// Initialise 3-D attributes to zero/null
RbtAtom::RbtAtom()
: m_nAtomId(0), m_nAtomicNo(6), m_strAtomName("C"), m_strSubunitId("1"),
: m_nAtomicNo(6), m_nAtomId(0), m_strAtomName("C"), m_strSubunitId("1"),
m_strSubunitName("RES"), m_strSegmentName("SEG1"),
m_eState(UNDEFINED), // DM 8 Dec 1998 Changed from SP3 to UNDEFINED
m_nHydrogens(0), m_nFormalCharge(0), m_coord(0.0, 0.0, 0.0),
m_dPartialCharge(0.0), m_dGroupCharge(0.0), m_dAtomicMass(0.0),
m_dVdwRadius(0.0), m_strFFType(""), m_pModel(nullptr), m_bCyclic(false),
m_nHydrogens(0), m_nFormalCharge(0), m_pModel(nullptr), m_bCyclic(false),
m_bSelected(false), m_bUser1(false),
m_dUser1(1.0), // DM 27 Jul 2000 - initialise user values to 1 as they are
// commonly used as weightings
m_dUser2(1.0), m_nPMFType(PMF_UNDEFINED),
m_triposType(RbtTriposAtomType::UNDEFINED) {
m_triposType(RbtTriposAtomType::UNDEFINED), m_coord(0.0, 0.0, 0.0),
m_dPartialCharge(0.0), m_dGroupCharge(0.0), m_dAtomicMass(0.0),
m_dVdwRadius(0.0), m_strFFType("") {
_RBTOBJECTCOUNTER_CONSTR_("RbtAtom");
}
......@@ -47,17 +47,17 @@ RbtAtom::RbtAtom(int nAtomId, int nAtomicNo /*= 6*/,
eHybridState eState /*= UNDEFINED*/,
unsigned int nHydrogens /*= 0*/, int nFormalCharge /*= 0.0*/
)
: m_nAtomId(nAtomId), m_nAtomicNo(nAtomicNo), m_strAtomName(strAtomName),
: m_nAtomicNo(nAtomicNo), m_nAtomId(nAtomId), m_strAtomName(strAtomName),
m_strSubunitId(strSubunitId), m_strSubunitName(strSubunitName),
m_strSegmentName(strSegmentName), m_eState(eState),
m_nHydrogens(nHydrogens), m_nFormalCharge(nFormalCharge),
m_coord(0.0, 0.0, 0.0), m_dPartialCharge(0.0), m_dGroupCharge(0.0),
m_dAtomicMass(0.0), m_dVdwRadius(0.0), m_strFFType(""), m_pModel(nullptr),
m_bCyclic(false), m_bSelected(false), m_bUser1(false),
m_pModel(nullptr), m_bCyclic(false), m_bSelected(false), m_bUser1(false),
m_dUser1(1.0), // DM 27 Jul 2000 - initialise user values to 1 as they are
// commonly used as weightings
m_dUser2(1.0), m_nPMFType(PMF_UNDEFINED),
m_triposType(RbtTriposAtomType::UNDEFINED) {
m_triposType(RbtTriposAtomType::UNDEFINED), m_coord(0.0, 0.0, 0.0),
m_dPartialCharge(0.0), m_dGroupCharge(0.0), m_dAtomicMass(0.0),
m_dVdwRadius(0.0), m_strFFType("") {
_RBTOBJECTCOUNTER_CONSTR_("RbtAtom");
}
......
......@@ -23,7 +23,7 @@
//}
RbtBaseFileSource::RbtBaseFileSource(const std::string &fileName)
: m_bMultiRec(false), m_bFileOpen(false) {
: m_bFileOpen(false), m_bMultiRec(false) {
m_strFileName = fileName;
m_szBuf = new char[MAXLINELENGTH + 1]; // DM 24 Mar - allocate line buffer
ClearCache();
......@@ -33,7 +33,7 @@ RbtBaseFileSource::RbtBaseFileSource(const std::string &fileName)
// Multi-record constructor
RbtBaseFileSource::RbtBaseFileSource(const std::string &fileName,
const std::string &strRecDelim)
: m_bMultiRec(true), m_strRecDelim(strRecDelim), m_bFileOpen(false) {
: m_bFileOpen(false), m_bMultiRec(true), m_strRecDelim(strRecDelim) {
m_strFileName = fileName;
m_szBuf = new char[MAXLINELENGTH + 1]; // DM 24 Mar - allocate line buffer
ClearCache();
......
......@@ -26,8 +26,8 @@ std::string RbtBaseGrid::_CT("RbtBaseGrid");
RbtBaseGrid::RbtBaseGrid(const RbtCoord &gridMin, const RbtCoord &gridStep,
unsigned int NX, unsigned int NY, unsigned int NZ,
unsigned int NPad)
: m_step(gridStep), m_NX(NX), m_NY(NY), m_NZ(NZ), m_N(NX * NY * NZ),
m_SX(NY * NZ), m_SY(NZ), m_SZ(1), m_NPad(NPad) {
: m_NX(NX), m_NY(NY), m_NZ(NZ), m_N(NX * NY * NZ), m_SX(NY * NZ), m_SY(NZ),
m_SZ(1), m_step(gridStep), m_NPad(NPad) {
// Set the logical (real-world) dimensions of the grid
SetGridMin(gridMin);
_RBTOBJECTCOUNTER_CONSTR_("RbtBaseGrid");
......
......@@ -29,8 +29,8 @@
RbtBaseMolecularFileSink::RbtBaseMolecularFileSink(const std::string &fileName,
RbtModelPtr spModel,
bool bUseModelSegmentNames)
: RbtBaseFileSink(fileName), m_spModel(spModel), m_bMultiConf(false),
m_bUseModelSegmentNames(bUseModelSegmentNames) {
: RbtBaseFileSink(fileName), m_bUseModelSegmentNames(bUseModelSegmentNames),
m_spModel(spModel), m_bMultiConf(false) {
Reset();
_RBTOBJECTCOUNTER_CONSTR_("RbtBaseMolecularFileSink");
}
......
......@@ -40,7 +40,7 @@ RbtCellTokenIter::RbtCellTokenIter(const RbtGPChromosomePtr c,
}
RbtCellTokenIter::RbtCellTokenIter(const RbtCellTokenIter &ti)
: chrom(ti.chrom), cells(ti.cells), current(ti.current) {
: chrom(ti.chrom), current(ti.current), cells(ti.cells) {
_RBTOBJECTCOUNTER_COPYCONSTR_(_CT);
}
......
......@@ -26,8 +26,8 @@ std::string RbtRealGrid::_CT("RbtRealGrid");
RbtRealGrid::RbtRealGrid(const RbtCoord &gridMin, const RbtCoord &gridStep,
unsigned int NX, unsigned int NY, unsigned int NZ,
unsigned int NPad)
: RbtBaseGrid(gridMin, gridStep, NX, NY, NZ, NPad), m_tol(0.001),
m_grid(nullptr), m_data(nullptr) {
: RbtBaseGrid(gridMin, gridStep, NX, NY, NZ, NPad), m_grid(nullptr),
m_data(nullptr), m_tol(0.001) {
CreateArrays();
// Initialise the grid to zero
SetAllValues(0.0);
......
......@@ -27,7 +27,7 @@ RbtStringTokenIter::RbtStringTokenIter(const istreamPtr fn, RbtContextPtr co)
}
RbtStringTokenIter::RbtStringTokenIter(const RbtStringTokenIter &ti)
: current(ti.current), filep(ti.filep), strtok(ti.strtok),
: filep(ti.filep), current(ti.current), strtok(ti.strtok),
contextp(ti.contextp) {
_RBTOBJECTCOUNTER_COPYCONSTR_(_CT);
}
......
......@@ -19,16 +19,16 @@ std::string RbtToken::_CT("RbtToken");
///////////////////
// Constructors
///////////////////
RbtToken::RbtToken(const RbtVble &v) : isvble(true), vble(v), comm(-1) {
RbtToken::RbtToken(const RbtVble &v) : comm(-1), vble(v), isvble(true) {
_RBTOBJECTCOUNTER_CONSTR_(_CT);
}
RbtToken::RbtToken(RbtCommands c) : isvble(false), comm(c), vble(RbtVble()) {
RbtToken::RbtToken(RbtCommands c) : comm(c), vble(RbtVble()), isvble(false) {
_RBTOBJECTCOUNTER_CONSTR_(_CT);
}
RbtToken::RbtToken(const RbtToken &t)
: isvble(t.isvble), comm(t.comm), vble(t.vble) {
: comm(t.comm), vble(t.vble), isvble(t.isvble) {
_RBTOBJECTCOUNTER_COPYCONSTR_(_CT);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment