* @brief Signed int bit-interpreted as an unsigned integer. * * @param v The value to bitcast. * * @return The converted value. */
| 411 | * @return The converted value. |
| 412 | */ |
| 413 | static inline unsigned int int_as_uint(int v) |
| 414 | { |
| 415 | // Future: Can use std:bit_cast with C++20 |
| 416 | unsigned int uv; |
| 417 | std::memcpy(&uv, &v, sizeof(int)); |
| 418 | return uv; |
| 419 | } |
| 420 | |
| 421 | /** |
| 422 | * @brief Unsigned integer bit-interpreted as a signed integer. |
no outgoing calls
no test coverage detected