mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Round one of fixes to avoid ridiculous numbers of spurious copy constructor and destructor calls.
Most of these fixes involve calls to BOOST_FOREACH to iterate over a map or unordered_map where the iterator type didn't perfectly match the internal type, so a reference into the map couldn't be created and a new value/content pair had to be created for each iteration.
This commit is contained in:
@@ -48,8 +48,8 @@ std::string createHTTPPost(const std::string& strMsg, const std::map<std::string
|
||||
<< "Content-Length: " << strMsg.size() << "\r\n"
|
||||
<< "Accept: application/json\r\n";
|
||||
|
||||
typedef const std::pair<std::string, std::string> HeaderType;
|
||||
BOOST_FOREACH(HeaderType& item, mapRequestHeaders)
|
||||
typedef std::map<std::string, std::string>::value_type HeaderType;
|
||||
BOOST_FOREACH(const HeaderType& item, mapRequestHeaders)
|
||||
s << item.first << ": " << item.second << "\r\n";
|
||||
s << "\r\n" << strMsg;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user