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:
Michal Hrusecky 2012-02-01 14:03:49 +01:00
parent 6fd7d49956
commit 8ab6c7a655
2 changed files with 2 additions and 0 deletions

View File

@ -87,6 +87,7 @@ bool PhrasePairCollection::GetCollection( const vector< string > sourceString )
}
}
sort(m_collection.begin(), m_collection.end(), CompareBySize());
return true;
}
void PhrasePairCollection::Print()

View File

@ -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)