Michał Chojnowski
4e35befcf2
treewide: get rid of incorrect reinterpret casts
...
In some places we use the `*reinterpret_cast<const net::packed<T>*>(&x)`
pattern to reinterpret memory. This is a violation of C++'s aliasing rules,
which invokes undefined behaviour.
The blessed way to correctly reinterpret memory is to copy it into a new
object. Let's do that.
Note: the reinterpret_cast way has no performance advantage. Compilers
recognize the memory copy pattern and optimize it away.
2021-03-17 17:00:38 +01:00
..
2021-01-21 11:15:13 +02:00
2021-02-15 17:47:59 +03:00
2021-02-15 17:47:59 +03:00
2020-10-11 22:09:19 +03:00
2020-06-25 15:33:31 -07:00
2021-03-17 17:00:38 +01:00
2020-09-22 17:24:33 +03:00
2021-02-10 13:04:35 +02:00
2021-03-08 16:04:20 +01:00
2020-10-11 17:23:40 +03:00
2020-08-03 15:55:16 +03:00
2020-06-18 14:08:29 +03:00
2020-11-10 15:45:01 +02:00
2020-07-03 12:28:14 -07:00
2021-03-08 16:04:20 +01:00
2021-02-15 20:41:09 +03:00
2020-07-28 18:00:29 +03:00
2020-07-28 18:00:29 +03:00
2020-08-03 12:51:16 +03:00
2021-03-17 17:00:38 +01:00
2020-11-17 10:15:47 +01:00
2020-11-17 10:15:47 +01:00
2020-08-06 19:01:18 +03:00
2021-03-08 16:04:20 +01:00
2020-06-02 09:12:21 +03:00
2020-09-22 17:24:33 +03:00
2020-09-22 17:24:33 +03:00
2020-06-18 14:18:21 +03:00
2020-11-01 16:46:18 +02:00
2020-10-11 14:40:32 +03:00
2021-03-17 17:00:38 +01:00
2021-01-30 20:54:20 +02:00
2020-06-01 09:08:40 +03:00
2020-06-01 09:08:40 +03:00
2020-06-14 08:18:39 -07:00
2020-06-18 14:18:21 +03:00
2020-11-04 11:13:59 +02:00
2020-10-13 12:32:14 +03:00
2020-10-13 12:32:14 +03:00
2021-02-02 09:30:29 +03:00
2021-03-08 16:04:20 +01:00
2020-11-02 18:03:19 +02:00
2021-03-17 17:00:38 +01:00
2020-08-04 17:54:45 +03:00
2020-06-02 09:12:21 +03:00
2020-11-17 16:53:20 +01:00
2021-03-15 13:54:49 +02:00
2021-02-14 19:09:29 +02:00
2021-01-08 14:16:08 +01:00
2021-02-16 23:43:07 +01:00
2020-11-24 12:23:56 +02:00
2020-09-22 17:24:33 +03:00
2020-08-18 14:31:04 +03:00
2020-08-18 14:31:04 +03:00
2021-02-16 21:35:14 +01:00
2020-07-14 16:29:43 +03:00
2020-11-17 15:13:21 +02:00
2020-10-18 18:16:30 +03:00
2020-06-02 09:12:21 +03:00
2021-03-10 09:22:34 +01:00
2021-03-10 09:22:34 +01:00
2021-02-16 21:35:15 +01:00
2020-10-14 16:45:21 +03:00
2021-03-08 16:04:20 +01:00
2020-05-23 11:09:10 +03:00
2020-09-22 17:24:33 +03:00
2020-09-22 17:24:33 +03:00
2020-10-21 11:14:44 +03:00
2021-01-15 14:05:44 +01:00
2021-01-21 13:03:59 +03:00
2021-01-21 13:03:59 +03:00
2021-01-21 13:03:59 +03:00