Fix compilation with GCC 4.6 and 4.7
The standard libraries for these versions of GCC do not have 'emplace' methods for associative containers.
This commit is contained in:
parent
7c9bc364f5
commit
90b0ee152b
5 changed files with 6 additions and 6 deletions
|
|
@ -117,7 +117,7 @@ Application::Messages* Application::ThreadMessages::operator ->()
|
|||
return iter->second.get();
|
||||
}
|
||||
pMessages_t pMsgs(new Messages());
|
||||
m_threadMsgMap.emplace(curId, pMsgs);
|
||||
m_threadMsgMap.insert({curId, pMsgs});
|
||||
return pMsgs.get();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ void XML_Node::addComment(const std::string& comment)
|
|||
XML_Node& XML_Node::mergeAsChild(XML_Node& node)
|
||||
{
|
||||
m_children.push_back(&node);
|
||||
m_childindex.emplace(node.name(), m_children.back());
|
||||
m_childindex.insert({node.name(), m_children.back()});
|
||||
node.setRoot(root());
|
||||
node.setParent(this);
|
||||
return *m_children.back();
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ void setupPlogReaction(PlogReaction& R, const XML_Node& rxn_node)
|
|||
std::multimap<double, Arrhenius> rates;
|
||||
for (size_t m = 0; m < rc.nChildren(); m++) {
|
||||
const XML_Node& node = rc.child(m);
|
||||
rates.emplace(getFloat(node, "P", "toSI"), readArrhenius(node));
|
||||
rates.insert({getFloat(node, "P", "toSI"), readArrhenius(node)});
|
||||
}
|
||||
R.rate = Plog(rates);
|
||||
setupReaction(R, rxn_node);
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ Plog::Plog(const std::multimap<double, Arrhenius>& rates)
|
|||
}
|
||||
|
||||
// Duplicate the first and last groups to handle P < P_0 and P > P_N
|
||||
pressures_.emplace(-1000.0, pressures_.begin()->second);
|
||||
pressures_.emplace(1000.0, pressures_.rbegin()->second);
|
||||
pressures_.insert({-1000.0, pressures_.begin()->second});
|
||||
pressures_.insert({1000.0, pressures_.rbegin()->second});
|
||||
}
|
||||
|
||||
void Plog::validate(const std::string& equation)
|
||||
|
|
|
|||
|
|
@ -447,7 +447,7 @@ void TransportFactory::getLiquidSpeciesTransportData(const std::vector<const XML
|
|||
throw CanteraError("getLiquidSpeciesTransportData","unknown transport property: " + nodeName);
|
||||
}
|
||||
}
|
||||
datatable.emplace(name,data);
|
||||
datatable[name] = data;
|
||||
}
|
||||
} catch (CanteraError& err) {
|
||||
err.save();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue