From 7b506cd1f45b59815e5de409c40303cdf55e7045 Mon Sep 17 00:00:00 2001 From: Andreas Schenk <andreas_schenk@hms.harvard.edu> Date: Thu, 13 Jun 2013 17:52:50 -0400 Subject: [PATCH] fixed some incomplete ctor initialization lists --- modules/conop/src/compound.hh | 44 ++++++++++++++++++----- modules/conop/src/compound_lib.cc | 11 ++++-- modules/conop/src/conop.cc | 4 ++- modules/conop/src/conop.hh | 10 ++++-- modules/conop/src/heuristic.hh | 9 +++-- modules/conop/src/minimal_compound_lib.hh | 4 ++- modules/io/src/mol/io_profile.cc | 3 +- 7 files changed, 67 insertions(+), 18 deletions(-) diff --git a/modules/conop/src/compound.hh b/modules/conop/src/compound.hh index c62c1aa80..e06dde4c3 100644 --- a/modules/conop/src/compound.hh +++ b/modules/conop/src/compound.hh @@ -70,12 +70,24 @@ struct DLLEXPORT_OST_CONOP Date { }; struct DLLEXPORT_OST_CONOP AtomSpec { - AtomSpec() - : ordinal(0), is_leaving(false) { + AtomSpec(): + ordinal(0), + name(), + alt_name(), + element(), + is_leaving(false), + is_aromatic() + { } AtomSpec(int o, const String& n, const String& a, const String& e, - bool l, bool r): ordinal(o), name(n), alt_name(a), element(e), - is_leaving(l), is_aromatic(r) {} + bool l, bool r): + ordinal(o), + name(n), + alt_name(a), + element(e), + is_leaving(l), + is_aromatic(r) + {} int ordinal; String name; String alt_name; @@ -93,10 +105,13 @@ struct DLLEXPORT_OST_CONOP AtomSpec { }; struct DLLEXPORT_OST_CONOP BondSpec { - BondSpec() - : atom_one(0), atom_two(0), order(1) { - + BondSpec(): + atom_one(0), + atom_two(0), + order(1) + { } + BondSpec(int a, int b, int o): atom_one(a), atom_two(b), order(o) {} bool operator==(const BondSpec& rhs) const { return atom_one==rhs.atom_one && atom_two==rhs.atom_two; @@ -126,8 +141,19 @@ public: AMBER ='A', } Dialect; - Compound(const String& id) - : olc_('?'), tlc_(id), chem_class_(), chem_type_(), dialect_(Compound::PDB){ + Compound(const String& id): + olc_('?'), + tlc_(id), + formula_(), + name_(), + atom_specs_(), + bond_specs_(), + chem_class_(), + chem_type_(), + dialect_(Compound::PDB), + creation_date_(), + mod_date_() + { } /// \brief three-letter code that is unique for every compound diff --git a/modules/conop/src/compound_lib.cc b/modules/conop/src/compound_lib.cc index 90e5df87c..35c60e0c3 100644 --- a/modules/conop/src/compound_lib.cc +++ b/modules/conop/src/compound_lib.cc @@ -476,8 +476,15 @@ CompoundPtr CompoundLib::FindCompound(const String& id, return CompoundPtr(); } -CompoundLib::CompoundLib() - : conn_(NULL), chem_type_available_(false) { +CompoundLib::CompoundLib(): + CompoundLibBase(), + compound_cache_(), + conn_(NULL), + chem_type_available_(false), + name_available_(), + creation_date_(), + ost_version_used_() +{ } CompoundLib::~CompoundLib() { diff --git a/modules/conop/src/conop.cc b/modules/conop/src/conop.cc index 58fc349b6..7ca7d961d 100644 --- a/modules/conop/src/conop.cc +++ b/modules/conop/src/conop.cc @@ -32,7 +32,9 @@ Conopology& Conopology::Instance() return impl; } -Conopology::Conopology() +Conopology::Conopology(): + known_elements_(), + lib_() { known_elements_.insert("AC"); diff --git a/modules/conop/src/conop.hh b/modules/conop/src/conop.hh index 34f58e080..69a4c9220 100644 --- a/modules/conop/src/conop.hh +++ b/modules/conop/src/conop.hh @@ -39,13 +39,19 @@ public: // returns the default compound library (if any) CompoundLibPtr GetDefaultLib() const { return lib_; } - void SetDefaultLib(const CompoundLibPtr& lib) { lib_ = lib; } + void SetDefaultLib(const CompoundLibPtr& lib) + { + lib_ = lib; + } bool IsValidElement(const String& element) const; private: Conopology(); - Conopology(const Conopology&) {} + Conopology(const Conopology&): + known_elements_(), + lib_() + {} Conopology& operator=(const Conopology&) {return *this;} std::set<String> known_elements_; diff --git a/modules/conop/src/heuristic.hh b/modules/conop/src/heuristic.hh index a0a7b60ff..40dbdb878 100644 --- a/modules/conop/src/heuristic.hh +++ b/modules/conop/src/heuristic.hh @@ -33,13 +33,18 @@ typedef boost::shared_ptr<HeuristicProcessor> HeuristicProcessorPtr; class DLLEXPORT_OST_CONOP HeuristicProcessor : public Processor { public: - HeuristicProcessor() { + HeuristicProcessor(): + Processor(), + lib_() + { } virtual ProcessorPtr Copy() const { return ProcessorPtr(new HeuristicProcessor(*this)); } HeuristicProcessor(bool bf, bool at, bool cn, bool aa, ConopAction zo): - Processor(bf, at, cn, aa, zo) {} + Processor(bf, at, cn, aa, zo), + lib_() + {} virtual String ToString() const; protected: diff --git a/modules/conop/src/minimal_compound_lib.hh b/modules/conop/src/minimal_compound_lib.hh index 208011545..b0defbaba 100644 --- a/modules/conop/src/minimal_compound_lib.hh +++ b/modules/conop/src/minimal_compound_lib.hh @@ -13,7 +13,9 @@ typedef boost::shared_ptr<MinimalCompoundLib> MinimalCompoundLibPtr; // amino acids and standard nucleotides class DLLEXPORT_OST_CONOP MinimalCompoundLib : public CompoundLibBase { public: - MinimalCompoundLib() {} + MinimalCompoundLib(): + CompoundLibBase() + {} virtual CompoundPtr FindCompound(const String& id, Compound::Dialect dialect) const; private: diff --git a/modules/io/src/mol/io_profile.cc b/modules/io/src/mol/io_profile.cc index d27f3918f..e48837e80 100644 --- a/modules/io/src/mol/io_profile.cc +++ b/modules/io/src/mol/io_profile.cc @@ -8,7 +8,8 @@ IOProfileRegistry& IOProfileRegistry::Instance() return reg; } -IOProfileRegistry::IOProfileRegistry() +IOProfileRegistry::IOProfileRegistry(): + profiles_() { profiles_["DEFAULT"]=IOProfile(); } -- GitLab