mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-08-17 07:20:48 +03:00
compile error on gcc 7.1.1
This commit is contained in:
parent
eb8979a0e2
commit
5ac7b56bdc
@ -579,10 +579,10 @@ void PhraseTableCreator::EncodeTargetPhraseREnc(std::vector<std::string>& s,
|
|||||||
if(r < bestRank) {
|
if(r < bestRank) {
|
||||||
bestRank = r;
|
bestRank = r;
|
||||||
bestSrcPos = *it;
|
bestSrcPos = *it;
|
||||||
bestDiff = abs(*it-i);
|
bestDiff = abs((long)*it-(long)i);
|
||||||
} else if(r == bestRank && unsigned(abs(*it-i)) < bestDiff) {
|
} else if(r == bestRank && unsigned(abs((long)*it-(long)i)) < bestDiff) {
|
||||||
bestSrcPos = *it;
|
bestSrcPos = *it;
|
||||||
bestDiff = abs(*it-i);
|
bestDiff = abs((long)*it-(long)i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user