Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/salm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2017-12-22 19:02:02 +0300
committerGitHub <noreply@github.com>2017-12-22 19:02:02 +0300
commit5319c22ce3f28e43ea4aac355cd22fedd5d2d3eb (patch)
tree3f297eee8a8fce8a90698276e67ce3a62bc5fe26
parent1f269bb53733fde890105f29b5c22ac93a828960 (diff)
parenta92d177d086614be67aef885b0568e32d895f5ef (diff)
Merge pull request #2 from flammie/fix-gcc-6-fstream-nullHEADmaster
fix gcc-6.4 compilation error
-rwxr-xr-xSrc/IndexSA/_MonoCorpus.cpp2
-rwxr-xr-xSrc/Utils/_UniversalVocabulary.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Src/IndexSA/_MonoCorpus.cpp b/Src/IndexSA/_MonoCorpus.cpp
index fe3ce38..369d2ff 100755
--- a/Src/IndexSA/_MonoCorpus.cpp
+++ b/Src/IndexSA/_MonoCorpus.cpp
@@ -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);
}
diff --git a/Src/Utils/_UniversalVocabulary.cpp b/Src/Utils/_UniversalVocabulary.cpp
index 9822c94..f034409 100755
--- a/Src/Utils/_UniversalVocabulary.cpp
+++ b/Src/Utils/_UniversalVocabulary.cpp
@@ -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);
}