Skip to content

Commit

Permalink
replace if constexpr with static_assert
Browse files Browse the repository at this point in the history
This never gets hit anyway.

Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Feb 22, 2025
1 parent 7cc2bcc commit c0ff3bf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/tags_int.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ std::ostream& printTagBitmask(std::ostream& os, const Value& value, const ExifDa
*/
template <size_t N, const TagDetailsBitlistSorted (&array)[N]>
std::ostream& printTagBitlistAllLE(std::ostream& os, const Value& value, const ExifData*) {
if constexpr (N == 0)
throw Error(ErrorCode::kerErrorMessage, "Passed zero length TagDetailsBitlistSorted");
static_assert(N > 0, "Passed zero length TagDetailsBitlistSorted");

uint32_t vN = 0;
uint32_t currentVNBit = 0;
Expand Down

0 comments on commit c0ff3bf

Please sign in to comment.