27 bool IsSigned =
true) {
28 assert(ByteLen >= 1 && ByteLen <= 9 &&
"Invalid BCD number");
30 size_t RunLen = ByteLen -
static_cast<unsigned>(IsSigned);
31 for (
size_t I = 0;
I < RunLen; ++
I) {
32 uint8_t DecodedByteValue = ((Ptr[
I] >> 4) & 0x0f) * 10 + (Ptr[
I] & 0x0f);
36 uint8_t DecodedByteValue = (Ptr[ByteLen - 1] >> 4) & 0x0f;
37 uint8_t Sign = Ptr[ByteLen - 1] & 0x0f;
39 if (Sign == 0x0d || Sign == 0x0b)