mirror of
https://github.com/gabime/spdlog.git
synced 2025-11-16 09:28:56 +08:00
Add static_cast to fix compiler warnings when building with -Werror=sign-conversion and -Werror=shorten-64-to-32: 1. Cast msg.color_range_start/end to qsizetype when passing to QString::fromUtf8(), since QString expects signed qsizetype but the message fields are size_t (unsigned). 2. Cast msg.level to size_t when indexing into colors_ array, since level_enum is a signed int but array indexing expects size_t. These casts are safe because: - qsizetype is guaranteed to be the same size as size_t per Qt docs - color_range values come from valid string positions - level values are from a small enum range Fixes #3321