Changeset 24a5e0


Ignore:
Timestamp:
Feb 26, 2010, 12:40:52 PM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
1f2217
Parents:
7042f45
Message:

Added -Wall flag and fixed several small hickups

Location:
src
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/MakroAction.cpp

    r7042f45 r24a5e0  
    2323{
    2424  Action* action;
    25   while(action=actions->removeLastAction()){
     25  while((action=actions->removeLastAction())){
    2626    delete action;
    2727  }
  • src/Actions/ManipulateAtomsProcess.cpp

    r7042f45 r24a5e0  
    1414ManipulateAtomsProcess::ManipulateAtomsProcess(boost::function<void(atom*)> _operation, AtomDescriptor _descr,
    1515                                               std::string _name,bool _doRegister) :
    16   operation(_operation),
     16  Process(0,_name,_doRegister),
    1717  descr(_descr),
    18   Process(0,_name,_doRegister)
     18  operation(_operation)
    1919{}
    2020
  • src/Actions/Process.cpp

    r7042f45 r24a5e0  
    1313  Action(_name,_doRegister),
    1414  maxSteps(_maxSteps),
     15  active(false),
    1516  starts(false),
    16   stops(false),
    17   active(false)
     17  stops(false)
    1818{}
    1919
  • src/Descriptors/AtomDescriptor.cpp

    r7042f45 r24a5e0  
    9797{}
    9898
    99 bool AtomAllDescriptor_impl::predicate(std::pair<int,atom*>){
     99bool AtomAllDescriptor_impl::predicate(std::pair<atomId_t,atom*>){
    100100  return true;
    101101}
     
    111111{}
    112112
    113 bool AtomNoneDescriptor_impl::predicate(std::pair<int,atom*>){
     113bool AtomNoneDescriptor_impl::predicate(std::pair<atomId_t,atom*>){
    114114  return false;
    115115}
     
    129129{}
    130130
    131 bool AtomAndDescriptor_impl::predicate(std::pair<int,atom*> atom){
     131bool AtomAndDescriptor_impl::predicate(std::pair<atomId_t,atom*> atom){
    132132  return lhs->predicate(atom) && rhs->predicate(atom);
    133133}
     
    145145}
    146146
    147 bool AtomOrDescriptor_impl::predicate(std::pair<int,atom*> atom){
     147bool AtomOrDescriptor_impl::predicate(std::pair<atomId_t,atom*> atom){
    148148  return lhs->predicate(atom) || rhs->predicate(atom);
    149149}
     
    165165}
    166166
    167 bool AtomNotDescriptor_impl::predicate(std::pair<int,atom*> atom){
     167bool AtomNotDescriptor_impl::predicate(std::pair<atomId_t,atom*> atom){
    168168 return !(arg->predicate(atom));
    169169}
  • src/Descriptors/AtomDescriptor_impl.hpp

    r7042f45 r24a5e0  
    1414  virtual ~AtomDescriptor_impl();
    1515
    16   virtual bool predicate(std::pair<int,atom*>)=0;
     16  virtual bool predicate(std::pair<atomId_t,atom*>)=0;
    1717
    1818protected:
     
    2828  AtomAllDescriptor_impl();
    2929  virtual ~AtomAllDescriptor_impl();
    30   virtual bool predicate(std::pair<int,atom*>);
     30  virtual bool predicate(std::pair<atomId_t,atom*>);
    3131};
    3232
     
    3535  AtomNoneDescriptor_impl();
    3636  virtual ~AtomNoneDescriptor_impl();
    37   virtual bool predicate(std::pair<int,atom*>);
     37  virtual bool predicate(std::pair<atomId_t,atom*>);
    3838};
    3939
     
    4545  AtomAndDescriptor_impl(AtomDescriptor::impl_ptr _lhs, AtomDescriptor::impl_ptr _rhs);
    4646  ~AtomAndDescriptor_impl();
    47   virtual bool predicate(std::pair<int,atom*>);
     47  virtual bool predicate(std::pair<atomId_t,atom*>);
    4848
    4949private:
     
    5757  AtomOrDescriptor_impl(AtomDescriptor::impl_ptr _lhs, AtomDescriptor::impl_ptr _rhs);
    5858  virtual ~AtomOrDescriptor_impl();
    59   virtual bool predicate(std::pair<int,atom*>);
     59  virtual bool predicate(std::pair<atomId_t,atom*>);
    6060
    6161private:
     
    7070  virtual ~AtomNotDescriptor_impl();
    7171
    72   virtual bool predicate(std::pair<int,atom*>);
     72  virtual bool predicate(std::pair<atomId_t,atom*>);
    7373
    7474private:
  • src/Descriptors/AtomIdDescriptor.cpp

    r7042f45 r24a5e0  
    2121{}
    2222
    23 bool AtomIdDescriptor_impl::predicate(std::pair<int,atom*> atom) {
     23bool AtomIdDescriptor_impl::predicate(std::pair<atomId_t,atom*> atom) {
    2424  return atom.first==id;
    2525}
  • src/Descriptors/AtomIdDescriptor_impl.hpp

    r7042f45 r24a5e0  
    1010  virtual ~AtomIdDescriptor_impl();
    1111
    12   bool predicate(std::pair<int,atom*> atom);
     12  bool predicate(std::pair<atomId_t,atom*> atom);
    1313
    1414protected:
  • src/Descriptors/AtomTypeDescriptor.cpp

    r7042f45 r24a5e0  
    2020{}
    2121
    22 bool AtomTypeDescriptor_impl::predicate(std::pair<int,atom*> atom) {
     22bool AtomTypeDescriptor_impl::predicate(std::pair<atomId_t,atom*> atom) {
    2323  return (atom.second->getType()==type);
    2424}
  • src/Descriptors/AtomTypeDescriptor_impl.hpp

    r7042f45 r24a5e0  
    1717  virtual ~AtomTypeDescriptor_impl();
    1818
    19   bool predicate(std::pair<int,atom*> atom);
     19  bool predicate(std::pair<atomId_t,atom*> atom);
    2020private:
    2121  element *type;
  • src/Legacy/oldmenu.cpp

    r7042f45 r24a5e0  
    812812void oldmenu::ManipulateMolecules(periodentafel *periode, MoleculeListClass *molecules, config *configuration)
    813813{
    814   atom *first = NULL;
    815814  Vector x,y,z,n; // coordinates for absolute point in cell volume
    816   int j, axis, count, faktor;
    817815  char choice;  // menu choice char
    818816  molecule *mol = NULL;
    819   element **Elements;
    820   Vector **vectors;
    821817  MoleculeLeafClass *Subgraphs = NULL;
    822818
  • src/Makefile.am

    r7042f45 r24a5e0  
    4141bin_PROGRAMS = molecuilder joiner analyzer
    4242molecuilderdir = ${bindir}
    43 #libmolecuilder_a_CXXFLAGS = -DNO_CACHING
     43libmolecuilder_a_CXXFLAGS = -Wall
     44#libmolecuilder_a_CXXFLAGS += -DNO_CACHING
    4445libmolecuilder_a_SOURCES = ${SOURCE} ${HEADER}
    4546libgslwrapper_a_SOURCES = ${LINALGSOURCE} ${LINALGHEADER}
    4647molecuilder_DATA = elements.db valence.db orbitals.db Hbonddistance.db Hbondangle.db
    4748molecuilder_LDFLAGS = $(BOOST_LDFLAGS)
    48 molecuilder_CXXFLAGS = $(BOOST_CPPFLAGS)
     49molecuilder_CXXFLAGS = -Wall $(BOOST_CPPFLAGS)
    4950#molecuilder_CXXFLAGS += -DNO_CACHING
    5051molecuilder_SOURCES = builder.cpp
  • src/Menu/DisplayMenuItem.cpp

    r7042f45 r24a5e0  
    2121
    2222DisplayMenuItem::DisplayMenuItem(Menu* _menu, StringView *_view, string _title, char _spacer, int _length ):
    23 MenuItem('\0',"",_menu),
    24 view(_view),
    25 title(_title),
    26 spacer(_spacer),
    27 length(_length)
     23  MenuItem('\0',"",_menu),
     24  view(_view),
     25  title(_title),
     26  length(_length),
     27  spacer(_spacer)
    2828{
    2929}
    3030
    3131DisplayMenuItem::~DisplayMenuItem()
    32 {
    33   // TODO Auto-generated destructor stub
    34 }
     32{}
    3533
    3634
  • src/Menu/TextMenu.cpp

    r7042f45 r24a5e0  
    1818 */
    1919TextMenu::TextMenu(ostream& _outputter, string _title, char _spacer,int _length) :
    20 outputter(_outputter),
    21 title(_title),
    22 spacer(_spacer),
    23 length(_length),
    24 quit(false),
    25 defaultItem(0)
     20  defaultItem(0),
     21  outputter(_outputter),
     22  title(_title),
     23  spacer(_spacer),
     24  length(_length),
     25  quit(false)
    2626{
    2727}
  • src/Patterns/Cacheable.hpp

    r7042f45 r24a5e0  
    4343  Cacheable<T>::Cacheable(Observable *_owner, boost::function<T()> _recalcMethod) :
    4444    owner(_owner),
    45     recalcMethod(_recalcMethod),
    4645    valid(false),
    47     canBeUsed(true)
     46    canBeUsed(true),
     47    recalcMethod(_recalcMethod)
    4848  {
    4949    // we sign on with the best(=lowest) priority, so cached values are recalculated before
  • src/UIElements/Dialog.cpp

    r7042f45 r24a5e0  
    102102Dialog::MoleculeQuery::MoleculeQuery(string title, molecule **_target, MoleculeListClass *_molecules) :
    103103    Query(title),
    104     target(_target),
     104    tmp(0),
    105105    molecules(_molecules),
    106     tmp(0)
     106    target(_target)
     107
    107108{}
    108109
     
    116117
    117118Dialog::VectorQuery::VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check) :
    118   Query(title), target(_target), cellSize(_cellSize), check(_check)
     119  Query(title),
     120  cellSize(_cellSize),
     121  check(_check),
     122  target(_target)
    119123{
    120124tmp = new Vector();
  • src/UIElements/TextDialog.cpp

    r7042f45 r24a5e0  
    114114bool TextDialog::VectorTextQuery::handle() {
    115115 tmp->AskPosition(cellSize,check);
     116 return true;
    116117}
  • src/Views/MethodStringView.cpp

    r7042f45 r24a5e0  
    77
    88#include "MethodStringView.hpp"
     9
     10using namespace std;
    911
    1012MethodStringView::MethodStringView(boost::function<string()> _displayMethod) :
  • src/Views/MethodStringView.hpp

    r7042f45 r24a5e0  
    1919{
    2020public:
    21   MethodStringView(boost::function<string()>);
     21  MethodStringView(boost::function<std::string()>);
    2222  virtual ~MethodStringView();
    2323
    24   virtual const string toString();
     24  virtual const std::string toString();
    2525
    2626private:
    27   boost::function<string()> displayMethod;
     27  boost::function<std::string()> displayMethod;
    2828};
    2929
  • src/Views/StreamStringView.cpp

    r7042f45 r24a5e0  
    77
    88#include <sstream>
     9#include <iostream>
    910
    1011#include "StreamStringView.hpp"
    1112
    12 StreamStringView::StreamStringView(boost::function<void(ofstream *)> _displayMethod) :
     13using namespace std;
     14
     15StreamStringView::StreamStringView(boost::function<void(ostream *)> _displayMethod) :
    1316StringView(),
    1417displayMethod(_displayMethod)
    15 {
    16   // TODO Auto-generated constructor stub
    17 
    18 }
     18{}
    1919
    2020StreamStringView::~StreamStringView()
    21 {
    22   // TODO Auto-generated destructor stub
    23 }
     21{}
    2422
    2523const string StreamStringView::toString() {
    2624  stringstream s;
    27   displayMethod((ofstream *)&s);
     25  displayMethod(dynamic_cast<ostream *>(&s));
    2826  return s.str();
    2927}
  • src/Views/StreamStringView.hpp

    r7042f45 r24a5e0  
    1010
    1111#include <boost/function.hpp>
     12#include <iostream>
    1213
    1314#include "Views/StringView.hpp"
     
    2425{
    2526public:
    26   StreamStringView(boost::function<void(ofstream *)>);
     27  StreamStringView(boost::function<void(std::ostream *)>);
    2728  virtual ~StreamStringView();
    2829
    29   virtual const string toString();
     30  virtual const std::string toString();
    3031
    3132private:
    32   boost::function<void(ofstream *)> displayMethod;
     33  boost::function<void(std::ostream *)> displayMethod;
    3334};
    3435
  • src/Views/StringView.hpp

    r7042f45 r24a5e0  
    1212#include "Views/View.hpp"
    1313
    14 using namespace std;
    15 
    1614/**
    1715 * View to show something as a string
     
    2624  virtual ~StringView();
    2725
    28   virtual const string toString()=0;
     26  virtual const std::string toString()=0;
    2927};
    3028
  • src/World.cpp

    r7042f45 r24a5e0  
    144144
    145145World::World() :
     146    periode(new periodentafel),
     147    atoms(),
    146148    currAtomId(0),
     149    molecules(),
    147150    currMoleculeId(0),
    148     periode(new periodentafel),
    149     molecules_deprecated(new MoleculeListClass(this)),
    150     atoms(),
    151     molecules()
     151    molecules_deprecated(new MoleculeListClass(this))
    152152{
    153153  molecules_deprecated->signOn(this);
     
    206206  // should see that it gets the updated new world
    207207  delete oldWorld;
     208  return theWorld;
    208209}
    209210
  • src/World.hpp

    r7042f45 r24a5e0  
    142142  protected:
    143143    void advanceState();
    144     World* world;
    145144    AtomSet::iterator state;
    146145    boost::shared_ptr<AtomDescriptor_impl>  descr;
    147146    int index;
     147
     148    World* world;
    148149  };
    149150
  • src/WorldIterators.cpp

    r7042f45 r24a5e0  
    1717World::AtomIterator::AtomIterator(AtomDescriptor _descr, World* _world) :
    1818    descr(_descr.get_impl()),
    19     world(_world),
    20     index(0)
     19    index(0),
     20    world(_world)
    2121{
    2222  state = world->atoms.begin();
  • src/atom_particleinfo.cpp

    r7042f45 r24a5e0  
    1414
    1515ParticleInfo::ParticleInfo(ParticleInfo *pointer) :
    16     Name(pointer->Name),
    17     nr(pointer->nr)
     16    nr(pointer->nr),
     17    Name(pointer->Name)
    1818    {}
    1919
  • src/boundary.cpp

    r7042f45 r24a5e0  
    965965  bool freeLC = false;
    966966  bool status = false;
    967   CandidateForTesselation *baseline;
     967  CandidateForTesselation *baseline=0;
    968968  LineMap::iterator testline;
    969969  bool OneLoopWithoutSuccessFlag = true;  // marks whether we went once through all baselines without finding any without two triangles
  • src/molecule.cpp

    r7042f45 r24a5e0  
    3434  first(new bond(start, end, 1, -1)), last(new bond(start, end, 1, -1)), MDSteps(0), AtomCount(0),
    3535  BondCount(0), ElementCount(0), NoNonHydrogen(0), NoNonBonds(0), NoCyclicBonds(0), BondDistance(0.),
    36   ActiveFlag(false), IndexNr(-1), last_atom(0), InternalPointer(start),
    37   formula(this,boost::bind(&molecule::calcFormula,this))
     36  ActiveFlag(false), IndexNr(-1),
     37  formula(this,boost::bind(&molecule::calcFormula,this)),
     38  last_atom(0),
     39  InternalPointer(start)
    3840{
    3941  // init atom chain list
  • src/molecule.hpp

    r7042f45 r24a5e0  
    350350  bool OutputConfigForListOfFragments(config *configuration, int *SortIndex);
    351351  int NumberOfActiveMolecules();
    352   void Enumerate(ofstream *out);
     352  void Enumerate(ostream *out);
    353353  void Output(ofstream *out);
    354354  void DissectMoleculeIntoConnectedSubgraphs(const periodentafel * const periode, config * const configuration);
  • src/molecule_dynamics.cpp

    r7042f45 r24a5e0  
    163163double molecule::ConstrainedPotential(struct EvaluatePotential &Params)
    164164{
    165   double tmp, result;
     165  double tmp, result=0;
    166166
    167167  // go through every atom
  • src/moleculelist.cpp

    r7042f45 r24a5e0  
    139139 * \param *out output stream
    140140 */
    141 void MoleculeListClass::Enumerate(ofstream *out)
     141void MoleculeListClass::Enumerate(ostream *out)
    142142{
    143143  element* Elemental = NULL;
  • src/tesselationhelpers.cpp

    r7042f45 r24a5e0  
    2727  int signum;
    2828  gsl_permutation *p = gsl_permutation_alloc(A->size1);
    29   gsl_matrix *tmpA;
     29  gsl_matrix *tmpA=0;
    3030
    3131  if (inPlace)
Note: See TracChangeset for help on using the changeset viewer.