Ignore:
Timestamp:
Jun 7, 2008, 1:20:30 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
42bdb2, a89a22
Parents:
a1c448
Message:

these are all smaller fixes due to extensively enabled compiler warnings

e.g. local variable shadows global (mol::nr by local nr)
and others

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/parser.cpp

    ra1c448 r75793b2  
    101101  ifstream input;
    102102  char *FragmentNumber = NULL;
    103   stringstream line;
     103  stringstream file;
    104104 
    105105  Header = (char *) Malloc(sizeof(char)*1023, "MatrixContainer::ParseMatrix: *EnergyHeader");
     
    107107  // count the number of matrices
    108108  MatrixCounter = -1; // we count one too much
    109   line << name << FRAGMENTPREFIX << KEYSETFILE;
    110   input.open(line.str().c_str(), ios::in);
     109  file << name << FRAGMENTPREFIX << KEYSETFILE;
     110  input.open(file.str().c_str(), ios::in);
    111111  if (input == NULL) {
    112     cout << endl << "Unable to open " << line.str() << ", is the directory correct?" << endl;
     112    cout << endl << "Unable to open " << file.str() << ", is the directory correct?" << endl;
    113113    return false;
    114114  }
     
    182182      Matrix[i][j] = (double *) Malloc(sizeof(double)*ColumnCounter, "MatrixContainer::ParseMatrix: *Matrix[][]");
    183183      input.getline(filename, 1023);
    184       stringstream line(filename);
     184      stringstream lines(filename);
    185185      //cout << "Matrix at level " << j << ":";// << filename << endl;
    186186      for(int k=skipcolumns;k--;)
    187         line >> filename;
     187        lines >> filename;
    188188      for(int k=0;(k<ColumnCounter) && (!line.eof());k++) {
    189         line >> Matrix[i][j][k];
     189        lines >> Matrix[i][j][k];
    190190        //cout << " " << setprecision(2) << Matrix[i][j][k];;
    191191      }
     
    522522  ifstream input;
    523523  char *FragmentNumber = NULL;
    524   stringstream line;
     524  stringstream file;
    525525  char filename[1023];
    526526 
     
    530530  for(int i=FragmentCounter;i--;)
    531531    KeySets[i] = NULL;
    532   line << name << FRAGMENTPREFIX << KEYSETFILE;
    533   input.open(line.str().c_str(), ios::in);
     532  file << name << FRAGMENTPREFIX << KEYSETFILE;
     533  input.open(file.str().c_str(), ios::in);
    534534  if (input == NULL) {
    535     cout << endl << "Unable to open " << line.str() << ", is the directory correct?" << endl;
     535    cout << endl << "Unable to open " << file.str() << ", is the directory correct?" << endl;
    536536    return false;
    537537  }
Note: See TracChangeset for help on using the changeset viewer.