Skip to content

Commit

Permalink
Remove extra cast
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jan 27, 2021
1 parent 5e5dfff commit d932cd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Marlin/src/feature/meatpack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ uint8_t MeatPack::unpack_chars(const uint8_t pk, uint8_t* __restrict const chars
out = kFirstCharIsLiteral;
else {
const uint8_t chr = pk & 0x0F;
chars_out[0] = meatPackLookupTable[(uint8_t)chr]; // Set the first char
chars_out[0] = meatPackLookupTable[chr]; // Set the first char
}

// Check if upper nybble is 1111... if so, we don't need the second char.
if ((pk & kSecondNotPacked) == kSecondNotPacked)
out |= kSecondCharIsLiteral;
else {
const uint8_t chr = (pk >> 4) & 0x0F;
chars_out[1] = meatPackLookupTable[(uint8_t)chr]; // Set the second char
chars_out[1] = meatPackLookupTable[chr]; // Set the second char
}

return out;
Expand Down

0 comments on commit d932cd9

Please sign in to comment.