From 39c8d18feba8eafcd43fbb55e73ae150a1947aad Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 13 Oct 2020 08:10:50 -0400 Subject: core/CMakeLists: Make some warnings errors Makes our error coverage a little more consistent across the board by applying it to Linux side of things as well. This also makes it more consistent with the warning settings in other libraries in the project. This also updates httplib to 0.7.9, as there are several warning cleanups made that allow us to enable several warnings as errors. --- src/common/hex_util.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/common/hex_util.h') diff --git a/src/common/hex_util.h b/src/common/hex_util.h index 120f1a5e6..a8d414fb8 100644 --- a/src/common/hex_util.h +++ b/src/common/hex_util.h @@ -16,14 +16,14 @@ namespace Common { [[nodiscard]] constexpr u8 ToHexNibble(char c) { if (c >= 65 && c <= 70) { - return c - 55; + return static_cast(c - 55); } if (c >= 97 && c <= 102) { - return c - 87; + return static_cast(c - 87); } - return c - 48; + return static_cast(c - 48); } [[nodiscard]] std::vector HexStringToVector(std::string_view str, bool little_endian); @@ -33,11 +33,11 @@ template std::array out{}; if constexpr (le) { for (std::size_t i = 2 * Size - 2; i <= 2 * Size; i -= 2) { - out[i / 2] = (ToHexNibble(str[i]) << 4) | ToHexNibble(str[i + 1]); + out[i / 2] = static_cast((ToHexNibble(str[i]) << 4) | ToHexNibble(str[i + 1])); } } else { for (std::size_t i = 0; i < 2 * Size; i += 2) { - out[i / 2] = (ToHexNibble(str[i]) << 4) | ToHexNibble(str[i + 1]); + out[i / 2] = static_cast((ToHexNibble(str[i]) << 4) | ToHexNibble(str[i + 1])); } } return out; -- cgit v1.2.3