use if constexpr

Suggested by MSVC.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2023-02-10 17:15:15 -08:00
parent 629f94eea3
commit b3ff42f2d5

View File

@ -240,7 +240,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 (N == 0)
if constexpr (N == 0)
throw Error(ErrorCode::kerErrorMessage, std::string("Passed zero length TagDetailsBitlistSorted"));
uint32_t vN = 0;