Skip to content

Commit

Permalink
[crispy] base64: casting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
christianparpart committed Apr 22, 2022
1 parent 8352031 commit 503f917
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/crispy/base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace detail
"0123456789+/" };

// clang-format off
char constexpr inline indexmap[256] = {
char unsigned constexpr inline indexmap[256] = {
/* ASCII table */
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, // 0..15
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, // 16..31
Expand Down Expand Up @@ -187,8 +187,8 @@ inline size_t decodeLength(const std::string_view& value)
template <typename Iterator, typename IndexTable, typename Output>
size_t decode(Iterator begin, Iterator end, const IndexTable& indexmap, Output output)
{
auto const index = [indexmap](Iterator i) -> unsigned char {
return static_cast<unsigned char>(indexmap[static_cast<uint8_t>(*i)]);
auto const index = [indexmap](Iterator i) {
return indexmap[static_cast<uint8_t>(*i)];
};

if (begin == end)
Expand Down

0 comments on commit 503f917

Please sign in to comment.