Skip to content

Commit

Permalink
Remove unsigned < 0 check
Browse files Browse the repository at this point in the history
uint8_t can never be < 0 so this addresses a warning from gcc.
  • Loading branch information
jmalkin committed Jan 24, 2023
1 parent c7a26d2 commit f042608
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpc/include/cpc_compressor_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ uint8_t cpc_compressor<A>::determine_pseudo_phase(uint8_t lg_k, uint32_t c) {
if (lg_k < 4) throw std::logic_error("lgK < 4");
const size_t tmp = c >> (lg_k - 4);
const uint8_t phase = tmp & 15;
if (phase < 0 || phase >= 16) throw std::out_of_range("wrong phase");
if (phase >= 16) throw std::out_of_range("wrong phase");
return phase;
}
}
Expand Down

0 comments on commit f042608

Please sign in to comment.