mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
refactor: modernize-avoid-c-arrays pt. 2 (#3713)
This commit is contained in:
@@ -736,7 +736,7 @@ uint64_t tr_htonll(uint64_t x)
|
||||
/* fallback code by bdonlan at https://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/875505#875505 */
|
||||
union
|
||||
{
|
||||
uint32_t lx[2];
|
||||
std::array<uint32_t, 2> lx;
|
||||
uint64_t llx;
|
||||
} u;
|
||||
u.lx[0] = htonl(x >> 32);
|
||||
@@ -757,7 +757,7 @@ uint64_t tr_ntohll(uint64_t x)
|
||||
/* fallback code by bdonlan at https://stackoverflow.com/questions/809902/64-bit-ntohl-in-c/875505#875505 */
|
||||
union
|
||||
{
|
||||
uint32_t lx[2];
|
||||
std::array<uint32_t, 2> lx;
|
||||
uint64_t llx;
|
||||
} u;
|
||||
u.llx = x;
|
||||
|
||||
Reference in New Issue
Block a user