mirror of https://github.com/status-im/qzxing.git
Fix invalid contruction of exception message
clang-tidy reported following problem: zxing/zxing/oned/rss/expanded/decoders/GeneralAppIdDecoder.cpp:397:77: warning: adding 'int' to a string does not append to the string [clang-diagnostic-string-plus-int] throw IllegalStateException("Decoding invalid alphanumeric value: " + sixBitValue); ^ zxing/zxing/oned/rss/expanded/decoders/GeneralAppIdDecoder.cpp:397:77: note: use array indexing to silence this warning throw IllegalStateException("Decoding invalid alphanumeric value: " + sixBitValue); ^ & [ ]
This commit is contained in:
parent
ee50acba1f
commit
2356e5b3e5
|
@ -394,7 +394,10 @@ DecodedChar GeneralAppIdDecoder::decodeAlphanumeric(int pos)
|
||||||
c = '/';
|
c = '/';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw IllegalStateException("Decoding invalid alphanumeric value: " + sixBitValue);
|
{
|
||||||
|
auto msg = "Decoding invalid alphanumeric value: " + std::to_string(sixBitValue);
|
||||||
|
throw IllegalStateException(msg.c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return DecodedChar(pos + 6, c);
|
return DecodedChar(pos + 6, c);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue