mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Use multimap type for storing header values (issue #386).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@346 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -34,7 +34,7 @@ void transfer_string_map_contents(cef_string_map_t fromMap,
|
||||
cef_string_map_key(fromMap, i, key.GetWritableStruct());
|
||||
cef_string_map_value(fromMap, i, value.GetWritableStruct());
|
||||
|
||||
toMap.insert(std::pair<CefString, CefString>(key, value));
|
||||
toMap.insert(std::make_pair(key, value));
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,3 +45,28 @@ void transfer_string_map_contents(const StringMap& fromMap,
|
||||
for(; it != fromMap.end(); ++it)
|
||||
cef_string_map_append(toMap, it->first.GetStruct(), it->second.GetStruct());
|
||||
}
|
||||
|
||||
void transfer_string_multimap_contents(cef_string_multimap_t fromMap,
|
||||
StringMultimap& toMap)
|
||||
{
|
||||
int size = cef_string_multimap_size(fromMap);
|
||||
CefString key, value;
|
||||
|
||||
for(int i = 0; i < size; ++i) {
|
||||
cef_string_multimap_key(fromMap, i, key.GetWritableStruct());
|
||||
cef_string_multimap_value(fromMap, i, value.GetWritableStruct());
|
||||
|
||||
toMap.insert(std::make_pair(key, value));
|
||||
}
|
||||
}
|
||||
|
||||
void transfer_string_multimap_contents(const StringMultimap& fromMap,
|
||||
cef_string_multimap_t toMap)
|
||||
{
|
||||
StringMultimap::const_iterator it = fromMap.begin();
|
||||
for(; it != fromMap.end(); ++it) {
|
||||
cef_string_multimap_append(toMap,
|
||||
it->first.GetStruct(),
|
||||
it->second.GetStruct());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user