Browse Source

Updated for c++11: Replace comparison of stream with NULL with stream.good().


git-svn-id: https://svn.microneil.com/svn/SNFMulti/branches/adeniz_1@67 dc71a809-1921-45c4-985c-09c81d0142d9
adeniz_1
adeniz 8 years ago
parent
commit
b1760c7145
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      snf_engine.cpp

+ 2
- 2
snf_engine.cpp View File

@@ -60,8 +60,8 @@ void TokenMatrix::Load(string& FileName) {
void TokenMatrix::Load(const char* FileName) { // Initializes the token matrix by file name.

ifstream MatrixFile(FileName,ios::binary); // Open the file.
if(MatrixFile == NULL || MatrixFile.bad()) // If anything is wrong with the file
throw BadFile("TokenMatrix::Load()(MatrixFile==NULL || MatrixFile.bad())"); // then throw a bad file exception.
if(!MatrixFile.good()) // If anything is wrong with the file
throw BadFile("TokenMatrix::Load()(!MatrixFile.good())"); // then throw a bad file exception.

Load(MatrixFile); // Load the matrix from the file.
MatrixFile.close(); // Be nice and clean up our file.

Loading…
Cancel
Save