Use make_pair without type

Replacing typed make_pair with non-typed version to fix compilation
issues.
This commit is contained in:
Michal Hrusecky 2012-01-31 13:44:56 +01:00
parent 3e637b2732
commit c4397c1491
2 changed files with 3 additions and 3 deletions

View File

@ -148,13 +148,13 @@ void pruneLatticeFB(Lattice & connectedHyp, map < const Hypothesis*, set <const
//sort hyps based on estimated scores - do so by copying to multimap
multimap<float, const Hypothesis*> sortHypsByVal;
for (size_t i =0; i < estimatedScores.size(); ++i) {
sortHypsByVal.insert(make_pair<float, const Hypothesis*>(estimatedScores[i], connectedHyp[i]));
sortHypsByVal.insert(make_pair(estimatedScores[i], connectedHyp[i]));
}
multimap<float, const Hypothesis*>::const_iterator it = --sortHypsByVal.end();
float bestScore = it->first;
//store best score as score of hyp 0
sortHypsByVal.insert(make_pair<float, const Hypothesis*>(bestScore, emptyHyp));
sortHypsByVal.insert(make_pair(bestScore, emptyHyp));
IFVERBOSE(3) {

View File

@ -115,7 +115,7 @@ struct VarSpanNode
key[4] = first->m_numSplitPoints;
std::pair<MapType::iterator, bool> result = m_children.insert(
std::make_pair<KeyType, VarSpanNode>(key, VarSpanNode()));
std::make_pair(key, VarSpanNode()));
VarSpanNode &child = result.first->second;
if (result.second) {
child.m_parent = this;