mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-19 23:27:46 +03:00
Alway return something in non-void functions
There were functions defined as non-void but didn't have return value for all possible passes. This can result in undefined behavior. Fixed this issue and returning values that somehow makes sense hopefully.
This commit is contained in:
parent
6fd7d49956
commit
8ab6c7a655
@ -87,6 +87,7 @@ bool PhrasePairCollection::GetCollection( const vector< string > sourceString )
|
||||
}
|
||||
}
|
||||
sort(m_collection.begin(), m_collection.end(), CompareBySize());
|
||||
return true;
|
||||
}
|
||||
|
||||
void PhrasePairCollection::Print()
|
||||
|
@ -601,6 +601,7 @@ string getOrientString(REO_POS orient, REO_MODEL_TYPE modelType)
|
||||
}
|
||||
break;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
void addPhrase( SentenceAlignment &sentence, int startE, int endE, int startF, int endF , string &orientationInfo)
|
||||
|
Loading…
Reference in New Issue
Block a user