fixed strict aliasing warning on gcc
This commit is contained in:
parent
600e280dda
commit
ccb808638d
|
@ -26,6 +26,7 @@
|
|||
incoming connection
|
||||
* added more detailed instrumentation of the disk I/O thread
|
||||
|
||||
* fixed strict aliasing warning on gcc
|
||||
* fixed inconsistency when creating torrents with symlinks
|
||||
* properly detect windows version to initialize half-open connection limit
|
||||
* fixed bug in url encoder where $ would not be encoded
|
||||
|
|
|
@ -169,24 +169,19 @@ namespace libtorrent
|
|||
// workaround for msvc-bug.
|
||||
// assumes sizeof(map<string, char>) == sizeof(map<string, entry>)
|
||||
// and sizeof(list<char>) == sizeof(list<entry>)
|
||||
union
|
||||
{
|
||||
char data[
|
||||
max4<sizeof(std::list<char>)
|
||||
, sizeof(std::map<std::string, char>)
|
||||
, sizeof(string_type)
|
||||
, sizeof(integer_type)>::value];
|
||||
integer_type dummy_aligner;
|
||||
};
|
||||
integer_type data[
|
||||
(max4<sizeof(std::list<char>)
|
||||
, sizeof(std::map<std::string, char>)
|
||||
, sizeof(string_type)
|
||||
, sizeof(integer_type)>::value + sizeof(integer_type) - 1)
|
||||
/ sizeof(integer_type)];
|
||||
#else
|
||||
union
|
||||
{
|
||||
char data[max4<sizeof(list_type)
|
||||
, sizeof(dictionary_type)
|
||||
, sizeof(string_type)
|
||||
, sizeof(integer_type)>::value];
|
||||
integer_type dummy_aligner;
|
||||
};
|
||||
integer_type data[
|
||||
(max4<sizeof(list_type)
|
||||
, sizeof(dictionary_type)
|
||||
, sizeof(string_type)
|
||||
, sizeof(integer_type)>::value + sizeof(integer_type) - 1)
|
||||
/ sizeof(integer_type)];
|
||||
#endif
|
||||
|
||||
#ifdef TORRENT_DEBUG
|
||||
|
|
Loading…
Reference in New Issue