Skip to content

Commit

Permalink
Merge pull request #2 from flammie/fix-gcc-6-fstream-null
Browse files Browse the repository at this point in the history
fix gcc-6.4 compilation error
  • Loading branch information
hieuhoang authored Dec 22, 2017
2 parents 1f269bb + a92d177 commit 5319c22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Src/IndexSA/_MonoCorpus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void C_MonoCorpus::loadCorpusAndSort(const char *fileName, const char * idVocFil
ifstream textStream1;
textStream1.open(fileName);

if(textStream1==NULL){
if(!textStream1){
fprintf(stderr,"Text %s does not exist. Exit!\n",fileName);
exit(-1);
}
Expand Down
2 changes: 1 addition & 1 deletion Src/Utils/_UniversalVocabulary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void C_UniversalVocabulary::updateWithNewCorpus(const char * newCorpusFileName)
ifstream textStream;
textStream.open(newCorpusFileName);

if(textStream==NULL){
if(!textStream){
fprintf(stderr,"Corpus file %s does not exist. Exit!\n",newCorpusFileName);
exit(-1);
}
Expand Down

0 comments on commit 5319c22

Please sign in to comment.