mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Use less error prone string list, map or multimap pointer types
Use pointers to incomplete struct types. If an argument of a not suitable type is passed to a function of any string collection, C compiler will warn: warning: passing argument 1 of <func> from incompatible pointer type C++ compiler will raise an error, for example: error: cannot convert 'cef_string_list_t' ... to 'cef_string_multimap_t' With the previously used `void*` pointer types, such errors in a code were not diagnosed.
This commit is contained in:
committed by
Marshall Greenblatt
parent
f90d5bc49e
commit
c3648f42b2
@ -13,7 +13,7 @@ using StringMultimap = std::multimap<CefString, CefString>;
|
||||
} // namespace
|
||||
|
||||
CEF_EXPORT cef_string_multimap_t cef_string_multimap_alloc() {
|
||||
return new StringMultimap;
|
||||
return reinterpret_cast<cef_string_multimap_t>(new StringMultimap);
|
||||
}
|
||||
|
||||
CEF_EXPORT size_t cef_string_multimap_size(cef_string_multimap_t map) {
|
||||
|
Reference in New Issue
Block a user