Skip to content

Commit e9e1ba9

Browse files
[crispy] base64: casting changes
1 parent 88b4d96 commit e9e1ba9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/crispy/base64.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace detail
2727
"0123456789+/" };
2828

2929
// clang-format off
30-
char constexpr inline indexmap[256] = {
30+
char unsigned constexpr inline indexmap[256] = {
3131
/* ASCII table */
3232
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, // 0..15
3333
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, // 16..31
@@ -187,8 +187,8 @@ inline size_t decodeLength(const std::string_view& value)
187187
template <typename Iterator, typename IndexTable, typename Output>
188188
size_t decode(Iterator begin, Iterator end, const IndexTable& indexmap, Output output)
189189
{
190-
auto const index = [indexmap](Iterator i) -> unsigned char {
191-
return static_cast<unsigned char>(indexmap[static_cast<uint8_t>(*i)]);
190+
auto const index = [indexmap](Iterator i) {
191+
return indexmap[static_cast<uint8_t>(*i)];
192192
};
193193

194194
if (begin == end)

0 commit comments

Comments
 (0)