From 7f2439439c92ef7c49b02666ba3ef03b4d5b1d37 Mon Sep 17 00:00:00 2001 From: Bailey Chittle Date: Wed, 11 Jan 2023 12:04:04 -0500 Subject: [PATCH] actually for sure fixed the -Werror=conversion, for the specific version of gcc --- include/spdlog/details/attr_composer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/spdlog/details/attr_composer.h b/include/spdlog/details/attr_composer.h index 56b48e55..51a320ad 100644 --- a/include/spdlog/details/attr_composer.h +++ b/include/spdlog/details/attr_composer.h @@ -53,16 +53,16 @@ inline void scramble(std::string& dst, string_view_t s) default: if (c <= '\x0f') { char buf[] = "\\u0000"; - buf[5] += static_cast(c); + buf[5] = (unsigned char)(buf[5] + c); if (c >= '\x0a') - buf[5] += 'a' - ':'; + buf[5] = (unsigned char)(buf[5] + ('a' - ':')); replace(buf); } else if (c <= '\x1f' || c == 0x7f) { char buf[] = "\\u0010"; - buf[5] += static_cast(c - 16); + buf[5] = (unsigned char)(buf[5] + (c - 16)); if (c >= '\x1a') - buf[5] += 'a' - ':'; + buf[5] = (unsigned char)(buf[5] + ('a' - ':')); replace(buf); } else