Lőrinc
af0ee28eb6
refactor: use _MiB consistently for Mebibyte conversions
...
Replace hard-coded MiB byte conversions (e.g. `1024*1024`, `1<<20`, `1048576`) with the existing `_MiB` literal to improve readability and avoid repeating constants.
In the few spots where arithmetic involves signed values, the result is identical to the previous code assuming those quantities never turn negative.
Also switch to brace init on every declaration assigned from `_MiB`/`_GiB` literals so a future oversized value (e.g. `unsigned int x{4096_MiB}`) becomes a compile error through the C++11 narrowing check instead of silently truncating.
Extend unit tests to cover the 32-bit `size_t` overflow boundary and to assert equivalence for integer and floating-point conversions.
Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz >
Co-authored-by: w0xlt <94266259+w0xlt@users.noreply.github.com >
2026-04-20 11:15:41 +02:00
..
2026-03-20 15:37:51 +00:00
2025-12-16 22:21:15 +01:00
2026-03-25 16:55:18 +01:00
2026-01-20 23:59:43 +01:00
2026-01-20 23:59:41 +01:00
2025-12-16 22:21:15 +01:00
2026-03-10 11:01:37 +01:00
2025-12-16 22:21:15 +01:00
2026-04-08 16:08:54 -04:00
2025-03-12 19:46:54 +01:00
2025-12-16 22:21:15 +01:00
2026-01-14 11:38:07 -08:00
2026-03-10 11:01:37 +01:00
2026-04-20 11:15:41 +02:00
2026-02-06 07:56:57 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2026-02-17 21:40:46 +05:30
2025-12-16 22:21:15 +01:00
2026-02-24 12:05:17 -05:00
2026-01-30 16:17:12 -05:00
2026-04-08 22:36:13 +02:00
2026-04-08 22:36:13 +02:00
2026-03-18 16:09:31 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-03-12 19:46:54 +01:00
2025-03-12 19:46:54 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2026-04-20 11:15:41 +02:00
2025-12-16 22:21:15 +01:00
2026-02-02 15:20:47 -08:00
2026-03-25 13:51:01 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-07-07 10:39:45 +02:00
2025-12-16 22:21:15 +01:00
2025-06-03 15:13:54 +02:00
2026-02-13 10:52:25 +01:00
2025-12-16 22:21:15 +01:00
2025-01-20 17:43:58 +01:00
2026-03-26 14:41:57 +01:00
2025-12-16 22:21:15 +01:00
2026-01-31 08:45:10 +03:00
2025-12-16 22:21:15 +01:00
2026-03-10 11:01:37 +01:00
2025-08-11 16:47:51 +01:00
2025-12-16 22:21:15 +01:00
2026-03-24 16:03:02 -07:00
2026-01-20 15:47:17 -08:00
2025-12-16 22:21:15 +01:00
2025-05-30 10:12:38 -04:00
2025-12-16 22:21:15 +01:00
2026-03-10 11:01:37 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2026-03-25 13:51:01 +01:00
2026-02-02 15:20:51 -08:00
2025-12-16 22:21:15 +01:00
2025-10-09 20:47:25 +02:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2026-03-10 11:01:37 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2026-03-25 16:55:18 +01:00
2025-01-15 15:44:03 +01:00
2026-03-10 11:01:37 +01:00
2026-03-10 11:01:37 +01:00
2025-03-12 19:46:54 +01:00
2026-01-27 14:45:35 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2026-03-10 11:01:37 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-11-25 10:35:11 +00:00
2026-04-20 11:15:41 +02:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2026-03-18 16:09:31 +01:00
2026-03-18 16:09:31 +01:00
2025-12-16 22:21:15 +01:00
2026-03-04 11:56:02 -05:00
2025-12-16 22:21:15 +01:00
2026-03-10 11:01:37 +01:00
2025-12-16 22:21:15 +01:00
2026-03-10 11:01:37 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2026-02-06 07:56:57 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2026-04-20 11:15:41 +02:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2025-08-14 10:17:32 +10:00
2025-12-16 22:21:15 +01:00
2026-03-10 11:01:37 +01:00
2025-03-12 19:46:54 +01:00
2026-04-07 13:55:42 -04:00
2025-12-16 22:21:15 +01:00
2025-12-16 22:21:15 +01:00
2026-02-17 15:02:40 -05:00
2026-04-03 22:00:29 +02:00
2026-04-08 22:36:13 +02:00
2026-02-06 07:56:57 +01:00
2026-02-06 07:56:57 +01:00
2026-01-27 14:45:35 +01:00
2026-03-10 11:01:37 +01:00
2026-02-24 10:08:47 -05:00
2026-03-10 11:01:37 +01:00
2025-12-16 22:21:15 +01:00
2026-03-25 16:55:18 +01:00
2026-03-25 16:55:18 +01:00
2026-03-10 11:01:37 +01:00
2026-03-10 11:01:37 +01:00
2026-03-10 11:01:37 +01:00
2025-06-03 19:56:55 +02:00
2026-03-13 09:02:09 +01:00