Ignore:
Timestamp:
Apr 23, 2021, 8:51:43 PM (5 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
d951a5
Parents:
49874c
git-author:
Frederik Heber <frederik.heber@…> (11/27/20 20:25:21)
git-committer:
Frederik Heber <frederik.heber@…> (04/23/21 20:51:43)
Message:

Modified fstream checks to good() or eof().

  • not using != or == NULL.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/MatrixContainer.cpp

    r49874c r0f9eb0  
    492492    delete[](FragmentNumber);
    493493    output.open(line.str().c_str(), ios::out);
    494     if (output == NULL) {
     494    if (!output.good()) {
    495495      ELOG(0, "MatrixContainer::WriteTotalFragments: Unable to open output energy file " << line.str() << "!");
    496496      performCriticalExit();
     
    522522  line << name << prefix << suffix;
    523523  output.open(line.str().c_str(), ios::out);
    524   if (output == NULL) {
     524  if (output.eof()) {
    525525    ELOG(0, "MatrixContainer::WriteLastMatrix: Unable to open output matrix file " << line.str() << "!");
    526526    performCriticalExit();
Note: See TracChangeset for help on using the changeset viewer.