Kaynağa Gözat

Removed ifstream NULL comparison

In C++11, implicit conversion changed from void* to bool
wx
Wombat 6 yıl önce
ebeveyn
işleme
694590d05f
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2
    2
      snf_engine.cpp

+ 2
- 2
snf_engine.cpp Dosyayı Görüntüle

@@ -57,8 +57,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.bad()) // If anything is wrong with the file
throw BadFile("TokenMatrix::Load() finds MatrixFile.bad()"); // then throw a bad file exception.

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

Loading…
İptal
Kaydet